Preheat the oven to 180°C/350°F.
Lightly spray a large baking tray with oil and spread out the sliced potatoes (use two trays if you need to). Spray the potatoes with oil, then sprinkle over a pinch of salt and pepper. Bake in the oven for 15 minutes, or until soft and just starting to turn golden. The potatoes may stick a little, so use a spatula to scrape them off if you need to. Keep the oven on at the same temperature.
Meanwhile, melt the butter in a large saucepan over a medium heat. Add the onion and spring onions and fry for 1 minute. Stir in the flour to create a roux, then gradually pour in the milk, stirring as you go to prevent lumps from forming. Add the cheeses and swiftly stir until they melt. Stir in the mustard, then season with a pinch of salt and pepper. The sauce will be very thick at this point – more spreadable than it is pourable. Remove the pan from the heat.
Rub the base and sides of a 22cm pie dish all over with a knob of butter. Line the dish with the sheet of shortcrust pastry. Trim any excess pastry around the top.
Spread a layer of the cheese sauce over the base of the pie, then top with a layer of potatoes, overlapping if needed. From there, you’ll do three more layers of cheese sauce and two more potato layers, finishing with a layer of cheese sauce. Brush the rim of the pastry with the egg.
Lay over the sheet of puff pastry and trim the excess. Use a fork to crimp around the edges, then trim with a knife. Brush the top with more egg wash, then slice a few small steam holes in the top.
Bake in the oven for 30 minutes, or until deep golden and crisp on top. Allow the pie to rest for 15 minutes before slicing (important or the cheese will all spill out).