Adjust oven rack to middle position and preheat oven to 400℉.
Mix ricotta, 2 tablespoons oil, ½ teaspoon salt, and ½ teaspoon pepper in a bowl.
In a separate bowl, mix together mozzarella and Parmesan.
Meanwhile, bring 6 quarts of water to boil in Dutch oven. Add 1 ½ tablespoons salt and pasta and cook until al dente. Reserve 1 ½ cups pasta cooking water, drain pasta, and set aside.
Dry emptied pot, add remaining 2 tablespoons oil, garlic, and pepper flakes, and cook over medium heat for 1 to 2 minutes until fragrant. Stir in tomatoes and simmer for 15 minutes.
Take off heat and season with salt and pepper to taste. Stir in cooked pasta and reserved cooking water.
Pour half of pasta-sauce mixture into 9-inch by 13-inch dish. Dollop large spoonfuls of ricotta mixture over pasta. Pour remaining sauce mixture over top and sprinkle mozzarella mixture on top.
Bake for 25 to 35 minutes until filling is bubbling and cheese has started to brown.
Let the casserole cool for 10 minutes. Sprinkle with basil and serve.
Notes
Fresh basil adds a burst of flavor and aroma that dried herbs can't match. Add it just before serving to retain its vibrant color and taste.
Slightly undercooking the pasta ensures it won't become mushy during baking. It will continue to cook and absorb flavors in the oven.
Layering the pasta, sauce, and cheese mixtures ensures every bite has a perfect balance of flavors and textures. Start with a layer of sauce to prevent sticking.
Allow the baked ziti to rest for about 10 minutes after baking. This helps the casserole set and makes it easier to serve without falling apart.
You can add cooked ground beef, sausage, or veggies like mushrooms and bell peppers to the sauce for additional flavor and texture. Sauté these ingredients before adding them to the tomato sauce.