Preheat the oven to 375°F (190°C).
Cook the rigatoni according to package instructions until al dente, then drain.
In a large mixing bowl, combine the cooked rigatoni, pesto, ricotta, salt, and pepper.
Fold in cherry tomatoes gently to avoid squashing them.
Grease a large baking dish with olive oil and pour in the pasta mixture evenly.
Sprinkle mozzarella and Parmesan cheese evenly over the top.
Cover the dish with aluminum foil and bake for 25 minutes.
Remove the foil and bake for an additional 10–15 minutes until the cheese is bubbly and golden.
Let it cool for a few minutes before serving. Garnish with more fresh basil if desired.