Preheat the oven to 350°F (175°C).
In a skillet, heat olive oil over medium heat. Sauté onions until translucent.
Add mushrooms and cook until moisture is released and they begin to brown.
(Optional) Stir in spinach and cook until wilted. Remove from heat and let cool slightly.
In a large bowl, whisk together eggs, cottage cheese (if using), salt, and pepper.
Fold in sautéed vegetables and crumbled feta cheese.
Pour mixture into a greased 9x13-inch baking dish, spreading evenly.
Bake for 30 minutes or until center is set and top is lightly golden.
Cool for 10 minutes before slicing into squares.
Garnish with herbs and serve warm or chilled.
