Preheat the oven to 350°F (175°C).
Cook the spaghetti according to package instructions until al dente, then drain and set aside.
In a large pan, melt the butter over medium heat.
Add the flour and stir to create a roux, cooking for 1-2 minutes.
Gradually whisk in the chicken broth and milk, stirring continuously until the mixture thickens.
Stir in the garlic powder, onion powder, salt, and pepper to taste.
Mix in the shredded chicken, peas, mushrooms, and cooked spaghetti until thoroughly combined.
Transfer the mixture to a greased casserole dish and spread evenly.
Top with grated Parmesan cheese and breadcrumbs, then bake for 25-30 minutes.
Remove from the oven and allow to cool for a few minutes before serving.