In a large skillet, heat the olive oil over medium heat. Add the chopped onion and cook until soft, about 5 minutes. Add the garlic and cook for another minute.
Add the chopped spinach to the skillet and cook until wilted, about 3-4 minutes. Remove from heat and let cool slightly.
In a large mixing bowl, combine the feta, ricotta, beaten eggs, dill, nutmeg, and the cooked spinach mixture. Mix well.
Brush a 9x13 inch baking dish with melted butter. Layer half of the phyllo dough sheets in the dish, brushing each sheet with butter before adding the next.
Spread the spinach and cheese mixture evenly over the phyllo dough. Layer the remaining phyllo sheets on top, again brushing each with melted butter.
Bake in the preheated oven for 45 minutes, or until the top is golden brown and crispy. Let cool for a few minutes before serving.
Notes:
For a more traditional flavor, you can add some chopped fresh parsley to the spinach mixture.