Heat oven to 200C/180C fan/gas 6 and put the rhubarb in a roasting tin. Sprinkle over 25g of the caster sugar, add the vanilla bean paste, give the tin a shake and put it in the oven for 15 mins. Remove, pour away any liquid from the tin and leave the rhubarb to cool.
Reduce oven to 170C/150C fan/gas 31⁄2. Grease and line a 25 x 20cm cake tin with baking parchment. In a small bowl, mix the flaxseed with 6 tbsp water and set aside for 5 mins.
In a bowl, beat together the margarine, 100g of the custard, the flour, baking powder, vanilla extract and remaining sugar. Once this is well combined, light and fluffy, add the apple sauce and flaxseed mixture.
Put a third of the mixture in the tin and top with a third of the rhubarb. Repeat twice more, then dot teaspoons of the remaining custard on top.
Bake in the oven for 45 mins, then cover with foil and bake for a further 30 mins or until golden brown and a skewer comes out clean when inserted in the middle. Serve warm as a pudding with soya custard, if you like. Or allow to cool completely, then sprinkle with icing sugar and enjoy as a cake. Eat the same day.