Preheat the oven to 180ºC/gas mark 4. Heat the oil in a large ovenproof frying pan and cook the potatoes for 15 minutes until golden. Add the onions, garlic, sweetcorn, peas, butter and rosemary. Cook for a further 15 minutes.
Remove and discard the rosemary. Season the vegetables with freshly ground black pepper then scatter over the courgette ribbons and cheddar. Using the back of a spoon, create 4 small wells in the mixture. Break the eggs into the wells, then transfer to the oven.
Bake for 10 minutes until the egg whites have set and the yolk is runny. If you’d prefer set yolks, bake for 15-20 minutes. Remove from the oven and serve with the salad on the side.