Preheat your oven to 200°C (180°C fan-assisted). Lightly grease a baking dish with vegetable oil.
Place the cod, bay leaf, peppercorns, and 375ml of milk in a pan. Gently poach the cod until just cooked, about 10 minutes. Remove the cod, reserving the milk for the sauce, and flake into large pieces.
In a separate pan, wilt the spinach with a bit of water. Drain and squeeze out excess moisture.
Layer the thinly sliced potatoes at the bottom of the prepared dish, season with salt and pepper, then scatter the shallots and wilted spinach over the top.
Melt 75g butter in a saucepan, stir in the flour to make a roux, then gradually whisk in the poaching milk and additional 220ml of milk until you have a smooth sauce. Add the grated Gruyère, mustard, a pinch of nutmeg, salt, and pepper, stirring until the cheese has melted.
Pour half of the cheese sauce over the spinach and potatoes. Arrange the flaked cod on top, then cover with the remaining sauce. Sprinkle with Panko crumbs and the extra mature cheddar.
Bake for 45-50 minutes, or until the top is golden and bubbling.