Lightly oil a 1.5 litre (2½ pint) baking dish with spray oil. Put the tomatoes, garlic, half the oil, sugar, basil and salt and pepper in a saucepan and bring to the boil. Reduce the heat and simmer for 30 minutes until reduced and thickened.
Cut each aubergine lengthways into 6 thin slices. Season the remaining oil with salt and pepper, then brush the aubergine slices with the seasoned oil. Cook under a preheated hot grill for 3–4 minutes on each side until charred and tender.
Arrange one-third of the aubergine slices, overlapping them slightly, in the base of the prepared dish. Add one-third of the tomato sauce and one-third of the goats' cheese and Parmesan. Repeat these layers, finishing with the 2 cheeses. Bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 30 minutes until bubbling and golden.