01 - Preheat oven to 375°F. Grease a 9x9-inch baking dish with butter or olive oil.
02 - Heat 1 tbsp olive oil in a large skillet over medium heat. Add chopped onion and sauté for 3 minutes until translucent. Add garlic and cook for 1 minute.
03 - Add spinach and cook, stirring, until wilted, about 2 minutes. Remove from heat and let cool slightly.
04 - In a large bowl, whisk together eggs, milk, oregano, black pepper, and salt until well combined.
05 - Arrange half of the zucchini slices in the prepared baking dish. Spread half of the spinach mixture over the zucchini, then sprinkle with half the feta and mozzarella.
06 - Repeat layers with remaining zucchini, spinach, feta, and mozzarella.
07 - Pour the egg mixture evenly over the layered vegetables and cheese. Drizzle with remaining olive oil and sprinkle with red pepper flakes if using.
08 - Bake uncovered for 35 minutes, or until the casserole is set and the top is golden brown.
09 - Let rest for 10 minutes before slicing and serving to allow the casserole to set.