To make the chocolate cake: Preheat the oven to 350°F (180°C). Spray three 8-inch round cake pans with nonstick cooking spray, line the bottom of each pan with a parchment paper circle, and set aside.
In a large mixing bowl, sift the flour, cocoa powder, baking soda, baking powder, and salt together. Whisk in the granulated sugar and brown sugar until well combined.
Add the oil, buttermilk, eggs, and vanilla extract and mix until just combined, the batter should be thick at this point.
Add the instant espresso powder to the cup of boiling water and mix until fully dissolved. Add to the mixing bowl and mix until just combined, the batter will be very thin.
Pour the batter evenly between the three prepared cake pans.
Bake for 25 to 30 minutes or until a toothpick inserted into the center of the cakes comes out clean and the tops spring back when lightly touched.
Remove from the oven and transfer to a wire rack to cool in the pans for 30 minutes. Run a knife around the outside of each cake layer in the pan, then carefully remove the cakes from the pans and place on the wire rack to cool completely.
To make the peanut butter frosting: In the bowl of a stand mixer fitted with the paddle attachment, or in a large mixing bowl using an electric mixer, beat the butter on medium speed for 1 to 2 minutes or until smooth.
Add the peanut butter and mix until fully combined, stopping to scrape down the sides of the bowl as needed.
Mix in half of the powdered sugar until well combined, then mix in the remaining half of the powdered sugar. The mixture will be very thick at this point.
Add the heavy whipping cream and vanilla extract and mix on low to medium speed for about 1 more minute until the mixture is thick and creamy, stopping to scrape down the sides of the bowl as needed.
To assemble the cake: Level the tops of each cake layer with a knife or cake leveler.
Add a tablespoon of buttercream to the center of a cardboard cake round or a cake stand to help the cake stick to the surface and not move around.
Place the first layer of cake onto your work surface. Scoop ¾ cup to 1 cup of frosting onto the first layer of cake and spread it around into one even layer.
Place the second cake layer upside down on top of the frosted cake layer. Spread another ¾ cup to 1 cup of frosting on top and spread it around into one even layer.
Place the third cake layer upside down on top of the frosted cake layer. Use the remaining frosting to frost the top and sides of the cake. If piping some decorations on top, reserve 1 to 1 ½ cups of frosting for later.
If using the chocolate ganache, allow it to cool for 20 to 30 minutes before adding it on top of the cake.