Preheat the oven to 375 degrees F (191 degrees C).
If using frozen spinach, thaw and squeeze to drain first. If using broccoli, place it into a pot of water and bring to a boil. Simmer for 1-2 minutes until bright green.
Combine the chicken, bacon, drained spinach or broccoli, garlic, ranch dressing, and half of the shredded cheeses in a large bowl. Stir until well incorporated. Transfer to a 9x13 in (23x33 cm) glass or stoneware casserole dish. (Alternatively, you can mix everything directly in the casserole dish.)
Bake for about 15 minutes, until hot and bubbly.