Preheat your oven to 375°F (190°C). Grease an 8x8-inch baking dish with olive oil or cooking spray.
Heat olive oil in a skillet over medium heat. Add the diced onion and cook for 4 minutes until translucent, then add minced garlic and cook for 30 seconds until fragrant. Remove from heat.
Ensure the spinach is completely drained by squeezing it tightly in a clean kitchen towel. In a large bowl, whisk the eggs together. Stir in the cottage cheese (or ricotta), parmesan, and most of the crumbled feta, reserving a small handful for the top.
Fold in the cooked onion, garlic, dried spinach, fresh dill, and nutmeg. Season lightly with salt and black pepper.
Pour the mixture into the prepared dish and smooth the top with a spatula. Scatter the remaining feta over the surface. Bake for 30 to 35 minutes until the center is set and the top is golden brown.
Let the pie cool for 10 minutes in the pan before slicing into squares.
