Preheat the oven to 200°C (180°C fan). Lightly oil two large baking trays. Lay out the aubergine slices, brush with olive oil on both sides, season with salt, and roast for 20–25 minutes until soft and lightly golden, turning halfway through.
In a large frying pan, heat 2 tbsp olive oil over medium heat. Add the onion and cook for 8–10 minutes until soft and golden. Stir in the garlic and cook for another minute. Add the chopped tomatoes, tomato purée, oregano, thyme, paprika, and a pinch of salt and pepper. Simmer gently for 15–20 minutes, stirring occasionally, until thickened. Stir in the beans and fresh basil.
Lightly grease a medium ovenproof dish. Spread a thin layer of tomato-bean sauce on the bottom, then add a layer of roasted aubergine. Continue layering until everything is used up, finishing with a layer of sauce.
Scatter over the mozzarella and Parmesan, then sprinkle with dried oregano. Reduce the oven to 190°C (170°C fan). Bake uncovered for 25–30 minutes, until bubbling and golden on top.
