Preheat the oven to 350°F. Grease a 9x13-inch baking dish with cooking spray.
Place the cut bagels in the greased baking dish.
In a mixing bowl, whisk together eggs, milk, salt, pepper, garlic powder, and onion powder. Stir in the cheddar and mozzarella cheese. Pour this mixture over the bagels in the dish. Dot the top evenly with cream cheese cubes.
Cover the dish with aluminum foil and bake in the preheated oven for 30 minutes. Remove the foil and continue to bake for another 20 minutes or until the top is golden brown and the center is set.
Allow the casserole to cool for 10 minutes before serving. This helps the casserole set and makes it easier to cut into portions.