Preheat the oven to 350 degrees F.
Heat 2 tablespoons butter over medium heat in a skillet. Add the diced onion and cook, stirring, until soft and translucent, about 6 minutes. Stir in the garlic and cook until fragrant and softened, an additional 2 minutes.
In a bowl, toss together the cooked onions and garlic, hash brown potatoes, condensed soup, sour cream, Parmesan, salt, pepper and 1 1/2 cups Cheddar. Spread the mixture in a 9-by-13 inch casserole dish. Melt the remaining 2 tablespoons butter. Top the casserole with the remaining 1/2 cup cheese, corn flake cereal and melted butter.
Bake in the oven until it bubbles around the sides, about 1 hour.