Begin by setting your oven to preheat at 350°F (175°C). Unfold the puff pastry sheets and place each one on a separate baking tray. Bake in the preheated oven for approximately 10 minutes or until evenly golden and crisp. Once baked, allow both sheets to cool entirely on wire racks.
In a heavy-bottomed saucepan, pour in 3 cups of the milk and heat gently over medium flame until it comes to a low boil.
In a separate large mixing bowl, beat the egg yolks with the granulated sugar vigorously until the mixture lightens in color and becomes creamy.
To the yolk mixture, incorporate the flour, remaining 1 cup of milk, vanilla extract, optional rum, and salt. Whisk steadily until no lumps remain and the batter is velvety smooth.
When the milk in the saucepan reaches a boil, reduce the heat slightly and gradually stream in the egg-flour mixture while stirring continuously. Continue to cook, stirring constantly, until the custard becomes thick and coats the back of a spoon thoroughly.
Meanwhile, whip the egg whites in a clean bowl using an electric mixer until they form stiff peaks. Once the custard has thickened, gently fold the beaten egg whites into the warm custard to introduce a light, airy texture.
Place one of the cooled puff pastry sheets into the base of a 9×13-inch rectangular baking dish. Evenly distribute the custard mixture over the pastry layer, smoothing the surface with a spatula.
Transfer the dish to the refrigerator and allow it to chill for 1 to 2 hours, or until the custard is completely set and firm to the touch.
After the custard layer has chilled, whip the cold heavy cream together with the icing sugar until stiff peaks are formed. Gently spread this whipped cream over the firm custard layer.
Using a sharp knife or pastry cutter, divide the second baked puff pastry sheet into 15 equal-sized squares. Arrange these neatly across the surface of the whipped cream layer.
Refrigerate the assembled dessert for a further 2 hours, allowing the layers to fully firm up and meld.
Just before serving, sprinkle with a light dusting of powdered sugar if desired. Slice through the pre-cut top layer to portion into 15 squares. Serve chilled for best texture and flavor.