Preheat oven to 375F (190°C). Grease an 8x8 inch (20x20 cm) casserole dish and set aside.
Add the olive oil to a pan over medium heat. Once the oil has heated, add the onion, garlic, and spinach and cook for 5 minutes until the spinach has reduced. Set aside.
In a large mixing bowl, whisk together the eggs, half-and-half, salt, and pepper. Stir in the shredded mozzarella and feta cheese. Leave aside some of the cheese to sprinkle on top.
Add the cooked spinach and egg mixture to the casserole dish and mix well. Sprinkle over the rest of the cheese.
Bake the keto egg bake for 40 - 50 minutes until the middle is firm and a toothpick inserted comes out clean.
Remove from the oven and allow the egg bake to cool for 10 minutes before slicing and serving.