Bring a large pot of salted water to a boil and cook the mostaccioli according to package directions until al dente. Drain and set aside.
Heat the olive oil in a large skillet over medium heat. Add the ground turkey, chopped onion, and minced garlic. Cook until the turkey is browned and the onion is soft, breaking up the meat as it cooks. Season with salt and black pepper.
Stir the marinara sauce into the skillet with the turkey mixture and let it simmer for 5 minutes.
In a large bowl, combine the cooked pasta with the turkey sauce and the ricotta cheese. Mix until evenly coated.
Transfer the mixture to a greased baking dish. Sprinkle the shredded mozzarella and grated Parmesan evenly over the top.
Bake at 375°F for 20 minutes or until the cheese is melted and bubbly. Let it rest for 5 minutes before serving.