Mix potatoes, chicken soup, ham, sour cream, cheese, broccoli, onion, and garlic together in a 3-quart shallow baking dish; season with black pepper. Sprinkle corn flakes over the top of the potato mixture to cover.
Bake in preheated oven until heated through, about 45 minutes.