Preheat the oven to 350°F (175°C). Grease a 9x9-inch or 9x13-inch baking dish, depending on how thick you want the slices.
Sauté the aromatics. In a skillet over medium heat, warm the olive oil or butter. Add the onion and cook 2–3 minutes until softened.
Stir in garlic and cook 30 seconds until fragrant.
Wilt the spinach. Add the chopped spinach to the pan and sauté 1–2 minutes, just until wilted. If using frozen spinach, make sure it’s squeezed dry before adding to the skillet. Remove from heat.
Whisk the egg mixture. In a large bowl, whisk eggs, heavy cream, oregano, red pepper flakes, salt, and black pepper until smooth.
Assemble the bake. Spread the spinach mixture evenly in the baking dish.
Sprinkle feta and mozzarella over the top. Pour the egg mixture over everything, gently shaking the pan to distribute.
Bake. Place on the center rack and bake for 25–35 minutes, depending on pan size, until the center is just set and no longer jiggly. A knife inserted near the center should come out mostly clean.
Rest and slice. Let it cool for 5–10 minutes.
Slice into squares and serve warm.