Preheat and prep. Heat your oven to 375°F (190°C). Grease a 9x13-inch baking dish with nonstick spray or butter.
Cook the pasta. Boil spaghetti in well-salted water until just shy of al dente (about 1 minute less than the package).
Drain and set aside. Toss with a drizzle of olive oil to prevent sticking.
Sauté mushrooms. In a large skillet, warm olive oil over medium-high heat. Add mushrooms and a pinch of salt.
Cook, stirring occasionally, until they release their liquid and turn golden, 7–9 minutes. Transfer to a plate.
Make the flavor base. In the same skillet, melt butter over medium heat. Add onion and cook until soft and translucent, 4–5 minutes.
Stir in garlic and cook 30 seconds, just until fragrant.
Build the roux. Sprinkle flour over the onions and stir for 1 minute. Slowly whisk in the wine (if using), letting it bubble for 1–2 minutes. Gradually add broth and milk, whisking constantly to avoid lumps.
Simmer and season. Bring the sauce to a gentle simmer.
Cook 4–6 minutes until thick enough to coat a spoon. Stir in salt, pepper, thyme, and paprika. Taste and adjust seasoning.
Add cheeses and sour cream. Off the heat, stir in Parmesan, mozzarella, and sour cream until smooth.
Fold in the sautéed mushrooms and half the parsley.
Combine with chicken and pasta. Add cooked chicken and drained pasta to the sauce. Toss until evenly coated.
Assemble. Transfer the mixture to the prepared baking dish. Top with a light sprinkle of Parmesan.
If using, mix panko with a teaspoon of olive oil and scatter over the top for crunch.
Bake. Bake uncovered for 20–25 minutes, until bubbly and lightly golden on top.
Finish and serve. Let it rest 5–10 minutes so it sets. Sprinkle remaining parsley and serve warm.