Preheat the oven to 200ºC/400ºF/gas 6. Grease a 22cm cake tin with oil and line the base with greaseproof paper.
Peel and finely slice the onions. Melt the butter in a frying pan on a medium heat, add the onions, then fry gently for 15 to 20 minutes, or until caramelised, golden and sticky.
Hold the corn cobs upright on a board and carefully run a small knife from the top of the corn to the bottom, cutting all the kernels off.
Add to the caramelised onions and cook for a further 5 minutes. Remove from the heat and set aside to cool.
Beat the eggs in a large bowl, then mix in the cornmeal, milk, baking powder, flour and a good pinch of sea salt and black pepper.
Grate the cheese, add most of it to the bowl, then beat until well mixed. Deseed, finely chop and stir in 2 chillies, along with the cooled onion and corn mixture.
Pour the mixture into the prepared cake tin. Finely slice and sprinkle over the remaining chilli, then pop the cornbread into the oven for 35 minutes, or until golden and cooked through. About 10 minutes before it’s ready, sprinkle over your remaining cheese and return it to the oven.
Cool for 15 minutes, then turn it out onto a wire rack or serving plate, cheesy side up. Serve straightaway – it’s unbelievably good when it’s warm.