Bring a large pot of salted water to a boil. Cook the spaghetti according to the package instructions until al dente, then drain and set aside.
In a large mixing bowl, combine the cream cheese, sour cream, cream of chicken soup, garlic powder, onion powder, salt, and black pepper. Stir in the chicken broth until smooth.
Preheat your oven to 350°F (175°C). In a large bowl, toss the cooked spaghetti with the shredded chicken and prepared sauce. Transfer the mixture to a greased 9×13-inch baking dish.
Sprinkle cheddar and mozzarella cheese evenly over the top. In a small bowl, mix the crushed Ritz crackers with melted butter and spread over the cheese layer.
Bake for 25–30 minutes until the cheese is bubbly and the topping is golden brown. Let it rest for 5 minutes before serving.