Grease a 9x13-inch baking dish with cooking spray.
In a large bowl, combine hash browns, 2 cups cheese, sour cream, cream of chicken soup, melted butter, and diced onion. Mix well.
Spread the hash brown mixture evenly into the prepared baking dish. Top with crumbled bacon.
In a medium bowl, whisk together eggs, milk, salt, pepper, and garlic powder.
Pour the egg mixture evenly over the hash brown layer. Sprinkle with remaining 1 cup of cheese.
Cover with foil and refrigerate for at least 2 hours or overnight.
When ready to bake, preheat oven to 350°F. Bake covered for 40 minutes, then remove foil and bake an additional 15 minutes until golden and bubbly.
Let rest for 10 minutes before cutting and serving.
To freeze: After step 5, cover tightly with plastic wrap and aluminum foil. Freeze up to 3 months. Thaw completely in refrigerator (24 hours), then bake as directed in step 7.