Preheat oven to 170°C (fan) / 190°C (conventional). Line your 30cm x 15cm tin with parchment paper.
Make the base: In a mixing bowl, combine flour, custard powder, sugar, and salt. Rub in the butter until it resembles breadcrumbs. Stir in the vanilla.
Press into the prepared tin and smooth it out.
Bake for 15 minutes until just lightly golden at the edges.
Jam layer: While still warm, spread the base evenly with the raspberry jam and lemon zest (if using). Let it sit while you prepare the topping.
Make the topping: In a bowl, beat the eggs with the sugar and vanilla until combined. Stir in the custard powder and desiccated coconut. Mix well until the custard is fully absorbed and the mixture is thick but spreadable.
Spoon the coconut custard mixture over the jam and gently press to spread evenly.
Bake for 25–30 minutes until the top is golden and firm.
Allow to cool completely in the tin, then lift out and slice into squares or bars.
