Preheat the oven to 350 degrees F (175 degrees C).
Mix hash browns, cream of chicken soup, Cheddar cheese, sour cream, butter, onion, salt, and pepper together in a bowl. Arrange in a 9×13-inch baking dish. Sprinkle on top. Drizzle butter over the cornflakes.
Bake in the preheated oven until the sauce is bubbly and the top is golden brown, 1 to 1 1/2 hours.