Dice the yellow onion into small pieces and measure out the minced garlic, oregano, basil, salt, pepper, and red pepper flakes into a small bowl. Fill a large pot with salted water and bring it to a boil, then add the rigatoni and cook according to box instructions until al dente—don't overcook, as the pasta will continue cooking in the oven. While the pasta cooks, preheat your oven to 350°F. I like to prep all my seasonings together so they're ready to go when the sausage finishes cooking, which keeps the workflow smooth.
Heat the olive oil in a large skillet over medium-high heat for about 30 seconds until shimmering. Add the crumbled Italian sausage and cook for 7 minutes, breaking it up with a wooden spoon as it cooks to ensure it's evenly browned and broken into small pieces. Once the sausage is cooked through and has good color, add the diced onion, minced garlic, and the spice mixture from Step 1. Sauté for 3 minutes, stirring occasionally, until the onion softens and the aromatics become fragrant—this is where the deep flavors develop.
Drain the cooked pasta from Step 1 and transfer it to a large pot or mixing bowl. Add the sausage mixture from Step 2 and the marinara sauce, then stir in half of the shredded mozzarella (about 4.5 oz). Fold everything together gently but thoroughly, ensuring the sauce coats all the pasta evenly and the ingredients are well combined. I find that freshly shredded mozzarella melts much better than pre-shredded cheese, which has anti-caking agents that interfere with a smooth, creamy texture.
Pour the pasta mixture from Step 3 into a 9x13 inch baking dish, spreading it evenly. Top with the remaining 4.5 oz of shredded mozzarella and the 3/4 cup of grated parmesan, distributing them evenly across the surface. This two-cheese topping creates a wonderful contrast—the mozzarella provides creaminess while the parmesan adds a sharp, salty finish.
Place the baking dish in the preheated 350°F oven and bake for 20 minutes, until the edges are bubbling and the cheese is melted and starting to set. After 20 minutes, switch the oven to broil on high and broil for 3 to 5 minutes, watching carefully, until the cheese topping is golden brown and slightly charred in spots. The broil step creates a beautiful, crispy top layer that contrasts perfectly with the creamy pasta underneath.
Remove the baking dish from the oven and let it rest for 2 to 3 minutes. This short rest allows the cheeses to set slightly and makes serving cleaner. Garnish with fresh basil if desired and serve hot directly from the dish or portioned into bowls.