1. Position two oven racks in the top third and bottom third of oven. Preheat oven to 400 degrees F. Toss bagel cubes with the melted butter and spread on two large baking sheets. Bake 10 to 15 minutes or until dried and toasted, rotating pans once halfway through baking.
2. Coat a 3-qt. baking dish with butter. Cover the bottom of the dish with one third of the bagel cubes. Sprinkle on one third each of the cheese, bacon (if using), and green onions. Repeat layers twice, starting with the bagel and ending with the onion.
3. In a large bowl, whisk together the eggs, milk, garlic powder, salt, and pepper. Pour mixture over the casserole to moisten the bread. Use a sheet of plastic wrap to gently press the bread into the egg mixture and cover the casserole. Chill at least 2 hours or up to overnight.
4. Preheat oven to 350 degrees F. Bake until set in the center (160 degrees F), about 50 to 60 minutes, covering with foil during last 20 minutes to prevent overbrowning.