Trim the aubergines and cut lengthways into thick slices. Brush them with the oil and place on 2 large baking sheets. Roast at the top of a preheated oven, 200°C (400°F), Gas Mark 6, for 10 minutes on each side until golden and tender.
Meanwhile, put the tomatoes and garlic in a saucepan and bring to the boil. Reduce the heat and simmer for 10 minutes, then season with salt and pepper.
Spoon a little of the tomato into an ovenproof dish and top with a layer of aubergines and some of the Cheddar. Continue with the layers, finishing with a layer of Cheddar on top. Sprinkle over the Parmesan and bake for 30 minutes until the cheese is bubbling and golden. Serve hot.