Preheat the oven to 350 °F.
Cook the pasta according to package directions until al dente, then drain and set aside.
Heat olive oil in a large skillet over medium heat.
Add diced chicken to the skillet and season with salt, pepper, garlic powder, and Italian seasoning.
Cook the chicken until browned and fully cooked, then remove from the skillet and set aside.
In the same skillet, add more oil if needed and sauté the chopped onion until translucent.
Add minced garlic to the onion and cook for about 1 minute.
Pour in the marinara sauce and bring it to a simmer.
Return the cooked chicken to the sauce and stir to combine.
Mix the cooked pasta with the chicken sauce either in a large bowl or directly in the baking dish.
Transfer the mixture to a baking dish.
Sprinkle shredded mozzarella and grated Parmesan evenly over the pasta mixture.
Bake for 20 to 25 minutes until the cheese is melted, bubbly, and golden.
Allow to cool for a few minutes, then garnish with fresh basil or parsley if desired and serve warm.