Preheat your oven to 400 degrees.
Cook the pasta according to package directions until al dente.
Add olive oil to a large skillet over medium heat.
Add diced onion and garlic. Sauté for 1 to 2 minutes until translucent.
Add ground chicken and cook until no longer pink.
Stir in the cooked pasta, marinara sauce, and red pepper flakes.
Season with salt and pepper to taste.
Sprinkle grated Parmesan and shredded mozzarella over the top.
Transfer to the oven and bake for 5 to 10 minutes until cheese is melted.
Garnish with fresh basil if desired before serving.