Pour in the tomatoes and simmer 4–5 minutes to develop the sauce. Season with a pinch of salt and pepper; if it tastes a bit sharp, add a tiny pinch of sugar to balance acidity.
Stir in the spinach and cook until just wilted, 1–2 minutes. Taste and adjust seasoning.
Make four shallow wells in the sauce and crack one egg into each well. Sprinkle with a little salt, pepper, and chili flakes if using. Scatter the cheese over the top.
Transfer the skillet to the oven and bake until the eggs are set to your liking—about 8–12 minutes for runny yolks, 12–15 minutes for a firmer yolk. Check at the 8-minute mark if you prefer liquid yolks.
Carefully remove, garnish with fresh herbs, and let rest 2–3 minutes. Serve hot with crusty bread to sop up the sauce.