Preheat oven to Gas 5, 190ºC, fan 170ºC. Heat oil in a pan and fry the onion until soft. Add bacon and pepper and fry over a high heat until the bacon is browned.
Butter an ovenproof dish. Thickly butter one side of the bread slices, cut into triangles and arrange in the dish. Spoon over the onion and bacon. Beat the eggs and milk together and pour over. Top with cheese and bake for 20 minutes until golden.