01 - Preheat oven to 350°F. Lightly grease a 9-inch round pie dish or equivalent baking vessel.
02 - Heat 1 tablespoon olive oil in a large skillet over medium heat. Cook onion until soft, about 3 minutes, then add garlic and cook for an additional minute.
03 - Add spinach to the skillet and sauté until wilted if fresh, or heated through if frozen. Remove from heat and allow to cool slightly.
04 - In a large mixing bowl, blend crumbled feta, ricotta, eggs, Parmesan (if used), dill, nutmeg, black pepper, and salt. Fold in the cooled spinach mixture until thoroughly incorporated.
05 - Place one sheet of phyllo in the prepared dish, allowing edges to hang over. Brush lightly with olive oil or butter. Repeat layering 3–4 more sheets, brushing each and rotating to cover edges.
06 - Evenly distribute the spinach and cheese filling over the phyllo base.
07 - Cover the filling with the remaining phyllo sheets, brushing each layer with oil. Tuck edges down into the dish sides to seal the pie entirely.
08 - Using a sharp knife, score the top phyllo gently into serving portions without cutting through the filling.
09 - Bake the pie for 35 to 40 minutes until the top is crisp and golden brown.
10 - Allow the pie to cool for 10 minutes before slicing and serving.