Heat half the oil in a large nonstick frying pan, add half the aubergine and cook for 5–7 minutes until softened and lightly golden. Season well, then remove from the pan to a plate. Repeat with the remaining oil and aubergine.
Place the tomato pasta sauce and chilli flakes in a saucepan, add the cooked aubergine and simmer for a couple of minutes.
Meanwhile, cook the pasta in a large saucepan of salted boiling water according to the pack instructions until al dente. Drain, reserving a little of the cooking water, and return to the pan. Stir through the aubergine sauce, adding a little cooking water to loosen if needed.
Toss through the Parmesan and season, then spoon into serving bowls. Top with the mozzarella and serve sprinkled with the basil.