Prep the pan and oven: Heat oven to 350°F (175°C).
Grease a 9x13-inch baking dish or a deep 3-quart casserole with butter. Set a larger roasting pan on the oven rack to use later as a water bath.
Cube the bread: Cut day-old bread into 1-inch cubes. If your bread is fresh, spread the cubes on a sheet pan and toast at 300°F (150°C) for 10–12 minutes to dry them slightly.
Heat the dairy: In a medium saucepan, combine milk, cream, cocoa powder, and espresso powder.
Whisk over medium heat until steaming and smooth, 3–4 minutes. Do not boil.
Melt in the chocolate: Remove from heat. Add chopped chocolate and butter.
Let sit 1 minute, then whisk until glossy and fully melted.
Whisk the custard: In a large bowl, whisk eggs, granulated sugar, brown sugar, vanilla, salt, and cinnamon (if using). Slowly stream in the warm chocolate mixture while whisking constantly, so the eggs don’t scramble.
Soak the bread: Add bread cubes to the bowl and gently fold to coat. Let sit 10–15 minutes, turning once or twice, so the bread absorbs the custard.
Stir in chocolate chips or chunks if you like extra pockets of melted chocolate.
Transfer to dish: Pour the mixture into the prepared baking dish and spread evenly, pressing lightly to level the top.
Set up the water bath: Place the baking dish inside the larger roasting pan. Carefully pour hot water into the outer pan until it reaches halfway up the sides of the baking dish. This helps the custard bake gently.
Bake: Bake for 40–50 minutes. The pudding should be set at the edges and slightly wobbly in the center.
A knife inserted near the center should come out mostly clean with a little chocolatey moisture.
Rest and serve: Remove from the water bath and let stand 10 minutes. Serve warm with a drizzle of cream or a scoop of vanilla ice cream.