Preheat the oven to 375°F (190°C).
Grease a 9x9-inch baking dish.
Heat olive oil in a skillet over medium heat.
Sauté the onion for 3–4 minutes until softened.
Add the garlic and cook for 30 seconds.
Stir in the spinach and cook until wilted.
Remove the skillet from the heat and allow the mixture to cool slightly.
In a large bowl, whisk together the eggs, milk, salt, pepper, and Italian seasoning.
Stir in the mozzarella cheese and Parmesan cheese.
Fold the cooked spinach mixture into the egg mixture.
Pour the mixture evenly into the prepared baking dish.
Bake for 30–35 minutes or until the center is set and lightly golden.
Let the egg bake rest for 5 minutes before slicing.
Serve warm and enjoy.