Preheat your oven to 350°F. Grease a 9-inch x 13-inch (or a 9-inch square) baking pan and set it aside.
In a large bowl, place the flour, xanthan gum, cocoa powder, cornstarch, baking powder, baking soda, salt and sugar, and whisk to combine well. Create a well in the center of the dry ingredients and add the sour cream, oil, eggs, coffee and vanilla, mixing to combine after each addition. The batter should be thick but soft. Scrape it into the prepared pan, smooth into an even layer and place in the center of the preheated oven. Bake until a toothpick inserted in the center of the cake comes out mostly clean or with a few moist crumbs attached (about 30 minutes). Do not overbake. Remove from the oven and allow to cool for about 5 minutes in the pan before poking holes every 1/2-inch all over the surface of the warm cake with a chopstick or skewer, wiggling the stick around a bit to create holes that are about 1/4-inch in diameter.
Make the pudding mixture.
As soon as the cake comes out of the oven, place all of the pudding ingredients in a medium-size heavy-bottom saucepan and whisk to combine well. Bring to a simmer over medium-high heat, stirring frequently, and continue to cook until the mixture just begins to thicken (about 5 minutes). Pour the hot pudding mixture over the top of the cake and gently spread it around so that it is absorbed into the cake through the holes. Allow the cake to sit until it has cooled completely, then cover and place in the refrigerator to chill for at least 30 minutes or up to 2 hours.
Make the topping right before serving.
Place the heavy whipping cream in the bowl of a stand mixer fitted with the whisk attachment or a large bowl with a handheld mixer. Turn the mixer on medium speed and whip the cream until soft peaks form. Add the sugar, raise the speed to high and continue to whip until stiff peaks form. Spread the whipped cream over the top of the chilled cake and sprinkle evenly with the chocolate shavings. Slice into squares and serve.