Preheat the oven: Set to 350°F (175°C). Grease a 9x13-inch baking dish with cooking spray or butter.
Sauté the aromatics: Warm olive oil or butter in a skillet over medium heat. Add chopped onion and cook 3–4 minutes until softened.
Stir in garlic and cook 30 seconds until fragrant.
Cook the spinach: Add fresh spinach to the skillet and cook until wilted, 2–3 minutes. If using frozen spinach, make sure it’s fully thawed and squeezed dry, then warm it through with the onions and garlic. Season lightly with salt and pepper.
Whisk the eggs: In a large bowl, whisk eggs with heavy cream (if using), 1/2 teaspoon salt, and 1/4 teaspoon black pepper.
Add a pinch of red pepper flakes if you like heat.
Assemble the bake: Spread the spinach mixture evenly in the baking dish. Sprinkle crumbled feta over the top. Pour the egg mixture evenly across the dish.
Gently shake the dish to settle everything.
Add herbs: Sprinkle chopped dill or parsley on top for a fresh finish.
Bake: Place on the center rack and bake 22–28 minutes, until the eggs are just set in the center and the edges are lightly golden. The center should jiggle slightly but not look wet.
Rest and serve: Let the egg bake rest 5–10 minutes to set. Slice into squares and serve warm.