Preheat the oven to 325°F. Lightly spray a 9×13-inch baking dish with nonstick cooking spray.
Cook the spaghetti in a large pot of salted boiling water until al dente according to package instructions. Drain and set aside.
In a large skillet over medium-high heat, melt 2 tablespoons of the butter. Add the mushrooms and cook for 5 to 7 minutes, stirring occasionally, until they release their liquid and turn golden brown. Remove from heat and set aside.
In a very large bowl, combine the shredded rotisserie chicken, condensed cream of mushroom soup, sour cream, chicken broth, the remaining butter (melted), grated Parmesan cheese, kosher salt, black pepper, onion powder, garlic powder, and cayenne pepper (if using). Stir until smooth and well combined.
Fold in the sautéed mushrooms.
Add the cooked spaghetti to the bowl and toss gently to coat the noodles evenly with the creamy mixture.
Pour the pasta mixture into the prepared 9×13-inch baking dish and spread it out evenly. (You can also use a large 12-inch oven-safe skillet if preferred.)
Sprinkle the shredded mozzarella cheese evenly over the top.
In a small bowl, mix the panko breadcrumbs, grated Parmesan cheese, melted butter, and garlic powder until the crumbs are evenly coated. Sprinkle this mixture over the mozzarella layer.
Cover the dish tightly with aluminum foil and bake for 45 minutes.
Remove the foil and bake for an additional 10 to 15 minutes, or until the top is golden brown, the edges are bubbly, and the casserole is heated through.
Remove from the oven and let it rest for 5 to 10 minutes. Sprinkle with chopped fresh parsley. Serve warm.