Preheat the oven to 375°F / 191°C.
Prepare the vegetable component. For frozen spinach, thaw it completely and press out as much moisture as possible. For fresh broccoli, boil the florets for 1 to 2 minutes, just until they turn vivid green, then drain them well.
In a large mixing bowl, place the cooked chicken, chopped bacon, prepared vegetables, minced garlic, ranch dressing, 1/2 cup shredded mozzarella, and 1/2 cup shredded cheddar. Stir until the ingredients are evenly coated and fully combined.
Add optional ranch seasoning at this stage, if using.
For a simpler cleanup, the same mixture may be combined directly in the casserole dish instead of using a separate bowl.
Spread the combined mixture into a 9×13 inch / 23×33 cm casserole dish, arranging it in an even layer.
Scatter the remaining 1/2 cup mozzarella and 1/2 cup cheddar evenly over the surface.
Bake for approximately 15 minutes, or until the casserole is thoroughly heated and the cheese on top is melted and bubbling.
Remove the dish from the oven and allow it to cool slightly before serving.