Preheat oven to 350°F and grease a 9x13-inch baking dish.
Cook spaghetti according to package directions until al dente, drain and set aside.
In a large skillet, melt butter over medium heat and sauté mushrooms until tender, about 5 minutes.
Sprinkle flour over mushrooms and stir for 1 minute, then gradually whisk in chicken broth and cream.
Add sherry, garlic powder, salt, and pepper, and simmer until sauce thickens, about 5 minutes.
Stir in 1 1/2 cups cheddar cheese and half the Parmesan until melted and smooth.
Combine cooked spaghetti, chicken, peas, and sauce in the baking dish, mixing well.
Top with remaining cheddar and Parmesan cheese, then bake for 30-35 minutes until golden and bubbly.