Heat the oven to 230C/gas mark 8. Cut around the pepper stalks, then lift out and discard, along with all the seeds. Put the peppers in a small ovenproof dish, drizzle with oil and put on the top shelf of the oven.
Mix the aubergine with four tablespoons of oil and season. Tip into a big baking tin and place on the shelf below the peppers. After 12 minutes, add the sweet potato, stir and roast for 12 minutes more. Now add the courgette, stir and roast for a further 10–12 minutes. By now, the peppers should be brown and the vegetables cooked. Remove everything from the oven and turn the heat to 160C/gas mark 2½. Cover the peppers with foil and leave to cool; once cool, peel and tear into strips.
Meanwhile, heat two tablespoons of oil in a frying pan on medium heat. Sauté the onions with the bay leaves and some salt for 25 minutes, stirring occasionally, until brown, soft and sweet. Discard the bay and set aside.
Grease a 22cm loose-bottomed tart tin. Roll the pastry to a 3mm-thick circle large enough to line the tin with some overhang. Press it into the edges. Line with baking parchment and fill with baking beans. Bake blind for 30 minutes, lift out the paper and beans, and bake for 10–15 minutes more, until golden brown. Remove and allow to cool a little. Spread the onions over the bottom, then top with roasted veg. Scatter over half the thyme, dot first with small chunks of both cheeses and then the tomato halves, cut-side up. Whisk the eggs and cream with some salt and pepper, and pour into the tart; the tomatoes and cheese should remain exposed. Scatter the remaining thyme on top. Bake for 35–45 minutes, until the filling sets and turns golden. Rest for at least 10 minutes, then trim off the excess pastry, remove the tart from its tin and serve.