Preheat oven to 350ºF.
Prepare a 9x13 baking dish by spraying it with cooking spray.
Prepare spaghetti according to package directions. Drain and set aside.
In a large skillet, over medium heat, add 2 tablespoons butter, onions, and mushrooms. Cook until onions are translucent and mushrooms are brown.
In a large mixing bowl, combine cream of chicken, cream of mushroom, sour cream, 8 tablespoons melted butter, chicken broth, salt, pepper, garlic powder, and cooked mushrooms and onions.
Add ham, peas, and prepared spaghetti. Stir well.
Transfer mixture to prepared baking dish.
Top with shredded cheddar cheese and grated Parmesan cheese.
Cover with aluminum foil and bake for 30 minutes.
Uncover and bake for an additional 15 minutes or until cheese is melted and bubbly.
Remove from oven and allow to sit for 10 minutes.
Sprinkle fresh parsley over top and serve.