Cut the pepper guanciale into strips. Put a frying pan on the heat, add oil and crushed garlic and let it brown. Remove the garlic and add the guanciale, then let everything cook over moderate heat.
In the meantime, wash the aubergines, dry them and cut them into chunks, add them to the guanciale with a pinch of salt and pepper and a few chopped basil leaves. Sauté the aubergines, occasionally stirring, cook until slightly soft, add the tomato puree and the pasta cooked al dente.
Finely chop the mozzarella and drain it. Prepare a lightly buttered ovenproof dish, add the previously seasoned pasta, half of the chopped mozzarella and sprinkle with Parmesan cheese.
Make a second and final layer, distribute the remaining mozzarella and Parmesan, sprinkle with pepper and bake in the preheated oven at 200°C for 20 minutes; turn on the grill function to gratinate!