Place the spinach and 2 tbsp water in a large pan. Cover and cook gently for 6-7 minutes until the spinach has just wilted. Drain in a large colander, pressing out as much liquid as possible using the back of a spoon.
Meanwhile, heat the oil in a frying pan and fry the onion and garlic over a medium heat for 7-8 minutes until tender. Roughly chop the drained spinach and stir into the pan with the nutmeg and season to taste. Leave to cool. Preheat the oven to 220°C, fan 200°C, gas 7.
Divide the pastry into two pieces, one slightly larger than the other. Roll out the smaller piece on a lightly floured surface to a 25cm diameter circle (use a dinner plate to trim to size). Transfer to a large baking sheet lined with baking paper.
Stir the feta into the spinach mixture then pile into the centre of the pastry circle, leaving a 3cm border. Brush the border with some of the beaten egg. Roll out the larger piece of pastry to a 27cm diameter circle. Drape over the filling and press together to seal. Crimp the pastry edge with your fingers then glaze the pie with beaten egg.
Use the tip of a sharp knife to score the top of the pastry in a criss-cross pattern and scatter over the sesame seeds. Bake for 25-30 minutes until the pastry is risen, crisp and golden. Serve warm or cold cut into slices.