In a large skillet, heat the olive oil over medium heat.
Add the finely chopped onion and cook until softened, about 5 minutes.
Add the minced garlic and cook for another minute.
Add the chopped spinach to the skillet and cook until wilted and any excess moisture has evaporated. If using frozen spinach, ensure it is well-drained before adding.
Remove from heat and let cool slightly.
In a large mixing bowl, combine the cooked spinach mixture, ricotta cheese, grated Parmesan cheese, 4 large eggs, salt, black pepper, ground nutmeg (if using), and dried oregano (if using). Mix until well combined.
Preheat your oven to 375°F (190°C).
Roll out one of the pie crusts and fit it into a 9-inch (23 cm) pie dish, leaving some overhang.
Spread half of the spinach and ricotta filling evenly into the prepared pie crust.
Make 4 small wells in the filling and carefully crack one whole egg into each well.
Spread the remaining filling over the top, smoothing it out evenly.
Roll out the second pie crust and place it over the filling.
Trim any excess dough and crimp the edges to seal.
Cut a few small slits in the top crust to allow steam to escape.
Brush the top of the pie with the beaten egg for a golden finish.
Bake in the preheated oven for 45-55 minutes, or until the crust is golden brown and the filling is set.
Let the pie cool slightly before slicing.
Enjoy your meal!