The two failure modes
A custard slice goes wrong in one of two ways, and they are opposites. Either the custard does not set firmly enough to cut into clean squares, or the base goes soggy underneath it. Almost every complaint about this kind of tray bake is one of the two, and the fix for each makes the other worse, which is why it is worth deciding which one you are solving.
Adding fruit pushes hard on both, and a wet fruit hardest of all. It thins the custard as it releases liquid, and that liquid then has to go somewhere, which is usually down into the pastry.
Rhubarb is the extreme case
Rhubarb measures 93.61% water, the highest of the thirty-four fruits in the register, with only 1.1 g of sugars per 100 g. Two consequences follow.
It carries more liquid into the bake than almost any other fruit, and it has so little sugar of its own that nothing is holding that liquid osmotically. A fruit with high sugar keeps some of its water bound; rhubarb does not, so it collapses and releases nearly all of it. That is why raw rhubarb in a custard slice is a reliable route to a flooded one, and it is a property of the ingredient rather than a fault in any recipe.
The standard answer is to take the water out first: cook the rhubarb down separately, drain it, and use the drained fruit rather than the raw stalks. The liquid that comes off is intensely flavoured and worth keeping, though it belongs in a syrup or a drink rather than in the slice. More on the ingredient at rhubarb.
Which custard sets firm enough to cut
Not every custard will cut. A custard set only by egg is tender by design and will slump at a cut edge; one set by starch holds a shape. For anything that has to be sliced into squares, the starch-set version is the one that works: crème pâtissière rather than crème anglaise. The distinction is set out at the pastry creams.
Starch has a second advantage here that is directly relevant: it tolerates a little extra liquid. An egg-set custard thinned by fruit juice simply fails to set; a starch-set one thins but still gels, up to a point. It is the more forgiving choice in the presence of fruit, and that is a structural reason rather than a matter of taste.
One thing to avoid: adding an acidic purée to a starch custard before the starch has set. Acid degrades starch as it cooks, so fruit goes in after the custard has thickened, not before. With a fruit as acidic as rhubarb, which measures pH 3.10 to 3.40, that is not a marginal effect.
And which pastry holds up
The base has to resist liquid from above for as long as the bake takes. That is exactly the property that separates the tart doughs: the one made by creaming rather than by rubbing the fat into the flour develops enough structure to hold a wet filling without leaking, and the sandy one does not. The comparison is at pâte sucrée.
There is a third route that avoids the conflict rather than managing it: bake the custard and the fruit separately and assemble cold. A fully baked case, a set custard piped in, and drained cooked fruit spooned on top gives a slice that cuts cleanly and a base that was never exposed to liquid at all. In texture it is a different dessert, layered rather than integrated. It is also the reliable version.
Blind baking the base fully before filling is the other half of the answer, and brushing the cooled case with beaten egg white or a thin layer of melted chocolate and returning it briefly to the oven gives one more barrier. Neither is traditional in every version, and both address the failure mode that a wet fruit makes likely.
Questions about custard slices
Why is my custard slice soggy underneath?
Liquid from the filling has soaked into the base. With a wet fruit it is nearly always the fruit. Cook and drain the fruit first, blind bake the case fully, and seal it with egg white or melted chocolate before filling.
Why will my custard not cut into clean squares?
It is probably set by egg alone, which is tender by design. A starch-set custard holds a cut edge: crème pâtissière rather than crème anglaise.
Can I use raw rhubarb in a custard slice?
It is the reliable route to a flooded one. Rhubarb is 93.6% water with almost no sugar to hold that water, so it releases nearly all of it. Cook it down and drain it first, and keep the liquid for a syrup.
When should the fruit go into the custard?
After the starch has set, not before. Acid degrades starch as it cooks, and rhubarb at pH 3.10 to 3.40 is acidic enough for that to matter.
Which pastry should the base be?
One made by creaming the butter and sugar rather than rubbing the fat into the flour, which develops enough structure to hold a wet filling. A sandy, rubbed dough is more likely to leak.