For the filling, pour one litre of cold water into a medium pan and bring to the boil. Peel the potatoes and cut into roughly 5mm slices. Carefully drop the potatoes into the hot water and return to the boil. Cook for 4-5 minutes, or until just tender but not breaking apart, then drain in a colander and rinse under running water until cold. Leave to drain.
Melt 25g/1oz of the cubed butter in a large non-stick frying pan and put the rest back in the fridge. Fry the onion over a medium heat for five minutes, or until fairly soft and lightly browned, stirring regularly. Remove from the heat. Preheat the oven to 200C/400F/Gas 6. Put a baking tray in the oven to heat.
To make the pastry, put the flour, butter and cheese in a food processor and blend on the pulse setting until the mixture resembles fine breadcrumbs. With the motor running, add the beaten egg and water and blend until the mixture comes together.
Remove the blade and take the pastry out of the food processor. Knead lightly until the dough forms a ball. Weigh the pastry and take off 250g/9oz for the pie lid. Roll into a ball and set aside. Gather the rest of the pastry into a ball and flatten slightly.
Roll the flattened pastry out on a lightly floured surface, turning every couple of rolls until around 4mm thick and 4cm/1½in larger than a 23cm/9in round pie dish. Lift the pastry over the rolling pin and drop gently into the pie dish. Press the pastry firmly into the base of the dish and up the sides, making sure there are no air bubbles. Leave the excess pastry overhanging the sides.
Arrange a third of the drained potato slices in the pie crust, dot with a third of the reserved butter and season with salt and pepper. Scatter half of the fried onions over the top. Add another third of the potatoes and butter; season well and top with the rest of the onions. Finish with the remaining potatoes and butter and a little more seasoning. Brush the rim of the dish with beaten egg.
Roll the reserved ball of pastry in the same way as the first. Cover the pie with the pastry lid and press the edges together firmly to seal. Trim the pastry with a knife and crimp the edges if you like. Make a couple of small holes in the centre of the pie with the tip of a knife. Glaze the top of the pie generously with beaten egg.
Bake on the tray in the centre of the oven for about 45 minutes, or until the pie is golden-brown all over and the potatoes are soft and piping hot. (You can check that the potatoes are ready by poking a skewer through the hole in the top of the pastry – it should slide in easily.)
For the mushroom gravy, pour the just-boiled water into a large jug and stir in the stock powder and dried mushrooms. Leave to stand for 20 minutes. Drain the mushrooms in a sieve over a bowl, reserving all the soaking liquor. Tip the soaked mushrooms onto a board and roughly chop.
Heat the oil and butter in a large non-stick frying pan and fry the chestnut mushrooms over a medium high heat for 5-6 minutes, or until they are lightly browned, stirring regularly.
Sprinkle over the flour and stir well. Slowly add the mushroom liquor to the pan, just a ladleful at a time, stirring well between each addition. At the bottom of the bowl of liquor you will probably see some grit from the mushrooms, avoid it as you ladle. This will mean you have around 1-2 tablespoons of unused liquid that can be chucked away.
Bring the mushroom sauce to a gentle simmer, stir in the chopped, soaked mushrooms and cook for three minutes, stirring occasionally until the gravy has thickened. Season with salt and lots of ground black pepper. Stir in the chives, if using.
For the wilted spinach with nutmeg, rinse the young spinach leaves in a colander and drain well. Melt the butter in a large non-stick frying pan or saucepan over a medium heat. Shake the spinach into the pan, season with some freshly grated nutmeg, a good pinch of salt and lots of ground black pepper.
Cover with a lid and cook for two minutes or until the spinach softens and wilts. Remove the lid now and again and give the spinach a stir. Serve hot.
Serve the pie with the wilted spinach and mushroom gravy.