Mix hash browns, Cheddar cheese, condensed soup, sour cream, melted butter, onion, salt, and pepper in a bowl. Transfer mixture to a 9x13-inch baking dish.
Bake uncovered in the preheated oven until sauce is bubbly and top is golden brown, 1 to 1 ½ hours.