Combine flour, powdered sugar, and salt in a food processor and pulse to combine. You can also do this by hand in a large bowl! Add cold butter and pulse in the food processor until it looks like sand. If doing this by hand, just break up the cold butter with your fingers and crumble until you get to the sand-like consistency. Add the egg yolk and vanilla extract and pulse or combine with your hands until the dough begins to stick together (it's okay if it's still a little bit crumbly!)
Wrap the dough in plastic wrap and chill for 30 minutes.
Preheat your oven to 350 degrees F (175 C). Line a large baking pan or sheet pan with parchment paper.
After refrigerating, roll out the dough into one large rectangle, trimming the edges if needed (you can always bake the scraps separately if you roll them out again!). Transfer the dough rectangle to your baking sheet.
Prick the top of the dough with a fork to prevent bubbles from forming.
Bake for about 20 minutes, until the dough is lightly golden around the edges. If your oven runs hot, make sure to check it around the 15 minute mark!
While the pastry is cooling, prepare the cake mixture. Crumble the cake into a bowl and add cocoa powder, melted chocolate, 4 tbsp of the jam (reserve one for spreading on the pastry), and rum.
Press together until it forms a thick paste consistency.
Spread a thin layer of jam over the pastry using the last tablespoon of jam.
Press the cake mixture on top of the jam, creating an even layer. It's okay if it doesn't go all the way to the edge; we will clean up the edges later!
Chill the assembled pastry for 15-20 minutes in the fridge. Once chilled, mix together icing by combining icing sugar and a splash of water. Spread over the top of the pastry. Add sprinkles if you would like!
Leave the icing to set for about 15 minutes, either in the fridge or on the counter. Trim off the edges and cut into ~15 squares. Enjoy!