Preheat oven to 350°F. Grease a 9x13-inch baking dish with butter or cooking spray. Cut bread into 1-inch cubes and spread evenly in the dish.
Whisk eggs in a large bowl for 1 minute until frothy. Add milk, sugar, melted butter, vanilla extract, cinnamon, nutmeg, and salt. Whisk for 3 minutes until smooth with no sugar grains visible.
Pour custard over the bread cubes. Use a spatula to press the bread down so it absorbs the liquid. Let sit exactly 10 minutes, pressing down twice during this time. If using, gently fold raisins through the soaked bread.
Place the baking dish uncovered in the oven and bake for 50-55 minutes. The edges should pull away from the pan and turn golden brown, while the center barely jiggles when you shake the dish. Tent loosely with foil if the crust browns too fast after 40 minutes.
Remove from oven and let the pudding rest on a cooling rack for 20 minutes. The custard will firm up as it cools, preventing a soupy texture when sliced.