Preheat and prep the squash: Heat the oven to 400°F (200°C). Line a baking sheet with parchment.
Carefully slice the spaghetti squash in half lengthwise and scoop out the seeds.
Roast the squash: Rub the cut sides with 1 tablespoon olive oil and season with a pinch of salt and pepper. Place cut-side down on the baking sheet and roast 30–40 minutes, until the skin yields to pressure and strands pull away easily with a fork.
Sauté aromatics: While the squash roasts, heat the remaining 1 tablespoon olive oil in a skillet over medium heat. Add onion and cook 4–5 minutes until softened.
Stir in garlic and cook 30 seconds until fragrant.
Build the sauce: Add the marinara, Italian seasoning, red pepper flakes, 1/2 teaspoon salt, and black pepper. Simmer 3–4 minutes to marry the flavors. Stir in the cooked chicken and remove from heat.
Shred the squash: When the squash is cool enough to handle, use a fork to scrape the flesh into strands.
Transfer to a large bowl and gently blot with paper towels if it seems very wet. This helps avoid a watery bake.
Combine: Add the chicken marinara mixture to the bowl of squash. Fold gently to coat all the strands without mashing them.
Taste and adjust seasoning if needed.
Assemble: Reduce oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish. Spread half of the squash mixture in the dish, sprinkle with half the mozzarella and half the Parmesan.
Add the remaining squash mixture and top with the rest of the cheeses.
Bake: Cover loosely with foil and bake 15 minutes. Uncover and bake another 10–15 minutes, until the cheese is melted, bubbling, and lightly browned in spots.
Garnish and serve: Let it rest 5–10 minutes to set. Sprinkle with chopped basil or parsley.
Serve warm.