Preheat your oven to 375°F. Bring a large pot of salted water to a boil and add the mostaccioli, cooking until just al dente according to package directions—this usually takes about 8-10 minutes. I always use Barilla because it holds its texture perfectly without turning mushy. Drain the pasta and set aside, but don't rinse it; the starch will help the sauce cling better.
While the pasta cooks, heat the olive oil in a large skillet over medium-high heat. Add the crumbled Italian sausage and cook for 3-4 minutes, breaking it into small pieces as it browns. Once the sausage is cooked through, add the freshly minced garlic and cook for just 1 minute until fragrant, then remove from heat. Stir in the marinara sauce and cooked pasta from Step 1, combining everything until the pasta is well coated with sauce.
In a bowl, combine the ricotta, mozzarella, Italian seasoning, and lightly beaten egg. Mix gently until just combined—you want the mixture to stay creamy and light, not overworked. I prefer Galbani whole milk ricotta because it creates a much creamier, richer layer in the final dish compared to lower-fat versions.
Spread half of the sausage-pasta mixture from Step 2 into a 9x13 inch baking dish. Spoon the ricotta cheese mixture from Step 3 evenly over the pasta layer, then top with the remaining sausage-pasta mixture. Finish by sprinkling the parmesan cheese over the top. Cover the dish tightly with foil and bake for 40 minutes at 375°F, then remove the foil and bake uncovered for an additional 5-10 minutes until the top is lightly golden and the edges are bubbling. Let it rest for a few minutes before serving so the layers set slightly.