Preheat oven at 425°F.
In a cast-iron skillet, heat olive oil, 2 turns of the pan. Add onion and garlic, season with salt and pepper and cook until soft. Add spinach and stock, and cook a minute or two. Crack the eggs over the top then transfer skillet to the oven and bake until eggs are set and the liquid is evaporated.