In a medium saucepan over medium-high heat, combine the cream, milk and chili pepper. Heat until the mixture just starts to bubble around the edges, and reduce the heat to low. Allow the mixture to steep over low heat for 15 minutes, to infuse the liquid with the chili. Strain through a fine-mesh sieve and return the liquid to the saucepan. Discard the chili.
In a medium bowl, whisk the sugar, cocoa, cornstarch and salt together to ensure there are no lumps. While whisking, gradually add the sugar and cocoa mixture into the liquid. Cook over medium heat, whisking constantly, until the mixture starts to bubble and thickens, about 3 – 4 minutes. Reduce the heat to medium-low. In a small bowl, whisk the egg yolks until lightly beaten. Add a ladle of the warm liquid to the eggs, whisking constantly, to temper them. Pour the egg mixture into the pot and whisk to combine with the rest of the liquid. Once combined, add the butter and whisk until melted. Add the vanilla and chocolate, and continue to whisk over medium heat until the chocolate has melted and the mixture is thick and smooth, about 2 – 3 minutes more. Transfer the pudding to a medium bowl, or individual pots (if using) and cover with plastic wrap. Cool for about 15 minutes and then transfer to the refrigerator for at least 3 hours or ideally, overnight.
When ready to serve, top with some whipped cream and a sprinkle of chili powder (if desired).
The pudding can be made up to two days in advance. I prefer to make it one day in advance so the chili flavor mellows a bit. This is a great pudding for serving in individual espresso cups.