Preheat oven to 350°F, grease a 9-inch round cake pan, and line with parchment paper.
In a saucepan, cook rhubarb, raspberries, sugar, and water over medium heat for about 10 minutes until jammy.
Stir in cornstarch slurry, cook 1 more minute until thickened, then let cool completely.
Cream butter and sugar until light and fluffy (about 3–4 minutes).
Beat in eggs one at a time, then add vanilla.
In another bowl, whisk together flour, baking powder, and salt.
Alternate adding dry ingredients and milk to the butter mixture, starting and ending with flour—mix just until combined.
Drop batter into the pan by spoonfuls, then add dollops of cooled compote on top.
Swirl gently with a skewer in figure-eight motions—don’t overdo it.
Bake 45–50 minutes, testing doneness in multiple spots; cool in pan 10 minutes, then fully on a wire rack.
Dust with powdered sugar before serving.