Start by heating the olive oil in a large skillet over medium heat. Add the chopped onion and green onion, sautéing them until they are soft and translucent, about 5-7 minutes.
Once the onions are ready, add the thawed and drained spinach to the skillet. Stir in the lemon juice, nutmeg, and oregano. Cook for another 2-3 minutes, allowing the flavors to meld.
Remove the skillet from the heat and let the mixture cool slightly. In a mixing bowl, combine the sautéed spinach and onion mixture with crumbled feta, beaten eggs, and Parmesan cheese (if using). Mix well until everything is evenly incorporated.
Preheat your oven to 375°F (190°C). Take your phyllo dough out and cover it with a damp cloth to prevent it from drying out. Lay one sheet of phyllo in your greased baking dish and brush it lightly with melted butter. Repeat this process for 7 sheets, layering them on top of each other.
Spread the spinach and cheese filling evenly over the layered phyllo. Once the filling is spread, fold the edges of the phyllo over the filling, then layer the remaining sheets on top, brushing each with butter as before. Use the remaining sheets (about 7) to cover the top, tucking in any overhanging edges.
Using a sharp knife, cut the assembled spanakopita into squares or diamond shapes. Brush the top with any remaining melted butter. Bake in the preheated oven for 30-35 minutes, or until the phyllo is golden brown and crisp.