Heat 4 tablespoons of olive oil in a large saucepan over medium-low heat. Add the minced garlic and cook, stirring occasionally, until softened and lightly golden, about 6 minutes. Stir in the red pepper flakes, then pour in the tomatoes along with 1 ½ cups of water. Increase the heat to high, bringing the mixture to a rolling boil while gently crushing the tomatoes with the back of a wooden spoon. Lower the heat and let the sauce simmer, stirring occasionally, until it thickens and reduces, about 15 minutes. Remove from heat, stir in the basil, and season with salt and black pepper. Let the sauce rest for 10 minutes before transferring it to a blender. Blend until completely smooth, following proper precautions when blending hot liquids.
Preheat the oven to 375°F. Grease a 9-inch springform pan with 1 tablespoon of olive oil. Meanwhile, bring a large pot of well-salted water to a rolling boil. Cook the rigatoni until just shy of al dente, about 8 minutes. Drain, then spread the pasta in a single layer on a rimmed baking sheet. Drizzle with the remaining 1 tablespoon of olive oil and toss to coat, preventing the noodles from sticking together.
Stand the rigatoni upright in the greased springform pan, arranging them tightly until the pan is completely filled. (Not all pasta may be needed.) Place the springform pan on a foil-lined baking sheet to catch any drips. Pour the prepared tomato sauce evenly over the pasta, using the back of a spoon to spread it into the crevices. (Some sauce may remain unused.) Generously sprinkle the top with grated mozzarella and Parmesan cheese.
Cover the pan loosely with foil, ensuring it does not touch the cheese, and bake for 30 minutes. Remove the foil and continue baking until the top turns golden brown and bubbly, approximately 30 minutes more. Allow the pie to rest for 10 minutes before carefully removing the sides of the pan. Slice into wedges and serve warm.