Heat the butter in a small saucepan, add the onion and cook for 5 minutes until softened. Leave to cool slightly.
Tip all the dry ingredients into a large bowl. Mix together the buttermilk and eggs in a jug, then pour into the dry ingredients and mix together until smooth. Add the finely chopped chilli, most of the cheese and the cooked onions and butter mixture, then stir until well combined.
Spoon the mixture into a greased and lined 20 cm (8 inch) deep cake tin or deep ovenproof frying pan. Smooth over the surface with a spoon, then scatter over the sliced chilli.
Bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 25 minutes. Sprinkle over the remaining cheese and return to the oven for a further 10 minutes, or until cooked through. Leave to stand for 2 minutes, then turn out and serve warm.