Remove the ricotta from its container and let drain in a fine mesh strainer over the sink to remove any excess liquid.
Finely chop the white onion and add it to a large saute pan with 1 tablespoon olive oil and cook over medium heat until the onions are soft and translucent, about 10 minutes.
While the onions are cooking, clean the greens well (see notes) and remove the marjoram from the stem and finely chop.
Add the greens and the marjoram, if using, to the pan with ½ teaspoon salt and cook until all the water has evaporated from the spinach, turning often to help the cooking process along, 10-15 minutes depending on how you remove the liquid. Listen for a slight sizzling sound as an indication that almost all the water has evaporated. It’s very IMPORTANT for all excess water to evaporate or the pie will be soggy. To speed up the process, spoon out a bit of the water as it’s expelled from the spinach, being careful not to remove the onion by using a fine mesh strainer. Transfer to a bowl and let cool.
While the water is evaporating, combine the drained ricotta, 1 egg, the parmesan, a few grinds of black pepper and 1 teaspoon salt into a large bowl. Mix well.
Add the cooled greens to the ricotta mixture and combine.
Remove a pie crust and gently place it into a 9-10 inch springform pan lined with parchment paper. Add the greens and ricotta mixture to the pie crust, creating an even layer.
Create 4 small holes with a spoon, evenly spaced in the spinach mixture and crack an egg into each hole.
Cover with the remaining pie crust and seal well. Let rest in the fridge for 30 min while you preheat the oven to 350° F (180° C)
Prick the top all over with a fork and gently brush with the egg yolk mixed with 1 teaspoon of water.
Bake in the bottom of the oven for 40-50 minutes until golden brown on top.
Let it cool in the pan for 20 minutes before transferring to a wire rack and letting it come to room temperature, about an hour, before cutting.