Make the raspberry filling by whisking water and cornstarch until smooth. Combine with raspberries, sugar, and lemon juice in a saucepan. Cook over medium heat, stirring and mashing berries. Bring to a boil and cook for 5 minutes. Remove from heat, stir in vanilla, cool, then refrigerate for at least 4 hours until thickened.
Preheat oven to 350°F (177°C). Grease and line three cake pans.
Whisk flour, cocoa powder, sugar, baking soda, baking powder, salt, and espresso powder in a bowl. In another bowl, mix oil, eggs, and sour cream, then add buttermilk and vanilla. Combine wet and dry ingredients, add hot water or coffee, and mix until smooth. Fold in chocolate chips.
Divide batter evenly into pans and bake for 24–26 minutes. Cool completely.
Make the buttercream by beating butter until creamy, then adding sugar, cocoa powder, cream, salt, and vanilla. Beat until smooth.
Assemble the cake by layering with buttercream and raspberry filling, using a buttercream border to hold the filling. Apply a crumb coat and chill, then frost fully.
Prepare ganache by pouring warm cream over chopped chocolate, letting it sit, then stirring until smooth. Add cream instead of liqueur for a halal-friendly version. Pour over the cake.