Preheat the oven to 200°C (400°F/Gas 6).
Pour a good 1/2 cm (1/4 in) olive oil in a frying pan over a medium heat and gently cook the aubergine for 10 minutes, until golden and tender. Remove from the pan with a slotted spoon and set aside.
Add the chorizo, if using, to the pan and fry until golden and all the fat has been released, about five minutes. Scoop out with the slotted spoon and set aside.
Add the onion to the pan, drizzling in a little extra oil if you didn’t use the chorizo, and cook for 10 minutes until soft, then add the garlic, chilli flakes and cumin seeds and cook for a couple of minutes before adding the tomatoes and peppers. Return the aubergine and chorizo to the pan along with a splash of water and season well. Cook over a low heat until the sauce is lovely and thick, about 10–15 minutes.
Tip the mixture into an ovenproof terracotta dish, spreading evenly. Make four hollows in the sauce and crack an egg into each. Pop the dish into the oven and bake for 15 minutes, until the eggs are just set. Serve immediately with crusty bread.