Preheat the oven to 375F and move the rack to the top third of the oven.
Boil a large pot of water and cook the pasta 2 minutes less than package directions indicate.
Meanwhile, combine the chicken soup, sour cream, chicken broth, ranch seasoning, onion powder, garlic powder, and pepper in a medium prep bowl, and then stir in the chicken.
Drain the spaghetti and add it to a 9×13 casserole dish.
Pour the bowl contents over the spaghetti and toss. Spread it in an even layer, and then top with the parmesan and mozzarella.
Bake, uncovered, for 20 minutes or until it's hot and bubbly. You can broil for a few minutes to brown the cheese if desired (watch it so it doesn't burn!).