Combine the brown sugar, granulated sugar, cinnamon, and pecans.
Begin by cutting the loaf of bread into slices and then 1-inch cubes. Place the cubes in a greased 9-by-13-inch baking dish.
Combine the eggs, milk, vanilla, cinnamon, and salt in a separate bowl. Pour over the bread cubes, making sure that all of the bread is evenly coated.
Cover and refrigerate for at least 8 hours, or overnight.
After the casserole has been refrigerated for at least 8 hours, preheat the oven to 350 degrees F.
Sprinkle the topping evenly over the casserole.
Bake for about 45 minutes, or until the top is golden brown and a knife inserted into the center of the casserole comes out clean. If the casserole starts to brown too quickly, cover it with aluminum foil for the remainder of the cooking time.
Serve hot with powdered sugar or maple syrup, if desired.