Bring a large pot of water to a boil. Add ziti and cook according to package directions until al dente (you want the noodles to be edible but still firm). Drain and toss the noodles with a little bit of olive oil to prevent them from sticking together.
Heat 1 tablespoon of olive oil in a large skillet over medium-high heat. Add the sausage and cook while breaking up into chunks with a spatula or spoon until the sausage is browned. Add onions and stir well to combine. Sauté until the onions are translucent and beginning to brown (about 4-5 minutes). Add garlic, basil, Italian seasoning, and red pepper flakes and stir to combine. Cook for 1 minute and then add the marinara sauce and stir well. Bring to a simmer.
Preheat the oven to 350 degrees F. Spread a thin layer of the sauce onto the bottom of a greased 9×13 inch baking dish. Dot the surface of the sauce with ricotta cheese. Add a ladle of the sauce into the pasta and stir well. Add the pasta into the casserole dish on top of the ricotta.
Pour the remaining sauce over the pasta and dot with the remaining ricotta cheese. Sprinkle the top with mozzarella and parmesan cheese.
Place into the oven and bake until the top is lightly browned and the cheese has melted (about 20 minutes).