Fry onion, garlic and mushrooms until soft and browned.
Bring a pot of water to the boil and blanch spinach until soft. Drain and squeeze out as much liquid as possible. Add to above fried ingredients and gently fry off any remaining liquid.
Whisk eggs with milk in a dish and add half the grated cheese.
In a medium sized casserole dish, carefully line the base and sides with filo sheets (2 sheets deep so no mix escapes), making sure there is some over hanging the sides so it can wrap up the mixture later on.
Put the onion, mushroom and spinach carefully in the dish on top of the filo sheets, spreading evenly. Then add squares of feta evenly over. Sprinkle over half the grated Cheddar.
Pour the milk and egg mix over the top, making sure the grated cheese is spread out. Save a little of the egg mixture for brushing later.
Carefully pull the overhanging filo sheets over the mixture so it is all covered. Any leftover sheets can be torn up and placed over the top, too. Brush with egg mix then sprinkle the remaining grated cheese all over.
Bake in the preheated oven until golden, about 45 minutes.
Tip
To make it non-vegetarian, add some cooked pancetta or crispy bacon in with the onions.