Preheat the oven to 180°C/350°F/Gas Mark 4.
Heat the olive oil in a pan and gently sweat the onion until softened but not coloured. Add the spinach and wilt down. Take the pan off the heat and add the herbs, cheeses, nutmeg and eggs and stir until thoroughly combined. Season and set aside.
Grease a baking dish and lay a sheet of filo pastry in the bottom and brush with melted butter. Keep the reserved sheets covered with a damp tea towel to prevent drying out. Arrange half the filo sheets in the base of the dish, brushing each one with melted butter. Top with the spinach mixture, then repeat with the filo pastry sheets, arranging them on top and brushing with butter.
Bake in the oven for about 40 minutes until crisp and golden on top.