Peel and finely chop the onion. Also, finely chop the pancetta.
Heat about 1 tbsp of oil in a large skillet. Sauté the onions and pancetta until softened.
Add the ground beef and deglaze with red wine. Bring to a boil.
Meanwhile, cook the pasta according to package directions in salted water. Cook it for about 2 minutes less than indicated on the package, then drain and rinse. Reserve about 2 tbsp of the pasta water and add it to the meat sauce.
Wash and halve the cherry tomatoes.
Add the crushed tomatoes and cherry tomatoes to the skillet. Season with salt and pepper, simmer for about 10 minutes, and preheat oven to 350°F.
Wash the basil and pluck the leaves.
Lightly grease a baking dish with oil. Add the remaining third of the pasta and sprinkle with Parmesan cheese.
Spread the pasta-sauce mixture over the pasta, tear the mozzarella into pieces, and distribute it evenly on top. Add a few basil leaves.
Bake the casserole for about 30 minutes, or until the mozzarella is lightly browned.