Preheat the oven to 400 F. Spray a 13 x 9 baking dish (or another similar shallow 2 1/2 quart baking dish) with nonstick spray. Cook the spaghetti according to package directions. Drain.
Meanwhile, in a large, deep saucepan, melt the 2 tablespoons of the butter over medium-high heat. Add the onions and mushrooms, season with salt and pepper, and cook, stirring occasionally, for about 8 minutes until they are browned and any liquid they have released evaporates. Remove to a plate.
Return the skillet to medium heat and melt the remaining 4 tablespoons of the butter. Sprinkle over the flour and cook, stirring 1 to 2 minutes until the flour is incorporated and turns golden. Whisk in the sage, broth, milk, and sherry if using, and bring to a simmer, whisking frequently for about 4 minutes until the sauce thickens. Stir in 1/4 cup Parmesan cheese until well blended.
Add the cooked mushrooms and onions, drained pasta, chicken, pimentos, and parsley (if your pan is not big enough, you can mix it all together in a large mixing bowl). Transfer the mixture to the prepared baking dish, and sprinkle with the remaining 1/4 cup Parmesan and the Gruyere.
Bake for 15 to 20 minutes until bubbly and golden brown. Serve hot.
Notes
If your pan is not big enough to toss all of the ingredients together, you can put everything together in a large mixing bowl.
This casserole really just needs to be warmed through in the oven, as everything in the casserole has already been cooked.
Make sure to use fresh mushrooms, not canned. I like some canned vegetables just fine (peas, corn, beans), but I’m not a fan of canned mushrooms, which I find to be soggy and insipid. You can use any combo of fresh mushrooms available to you or just stick with a simple button mushroom or cremini.
Don’t skip the cheese topping. The crunchy cheesy layer browns up very appealingly and is the perfect contrast to the creamy, tender filling.
Thyme, marjoram, or rosemary would be good choices in place of the sage if you prefer