Preheat the oven to 390F (200C). Place the puff pastry squares in a single row on a baking sheet. Brush evenly with butter and sprinkle the sugar on top. Bake for 20-25 minutes until golden brown, then set on counter to cool. Leave the oven on.
Whip the heavy cream by adding the cold cream to the bowl of a mixer along with the vanilla and sugar, and whipping on medium high speed until soft peaks form. Set aside.
Add the milk and sugar to a medium saucepan over medium heat, stir until sugar dissolves then bring to a boil. Once the milk boils, remove from heat.
Break 3/4 of the puff pastry into chunks and scatter on the base of a 9x13 inch pan. Add all the nuts and raisins by sprinkling evenly over the pastry surface. Pour all of the hot milk on top.
Break up the remaining 1/4 of the puff pastry and scatter it evenly on top of the milk. Spread the whipped cream evenly on the top.
Turn the oven to the broil function, at the same temperature (390F, 200C). Place um ali in the middle rack of the oven and broil for around 10 minutes, watching carefully, until golden brown and bubbly. Sprinkle with additional pistachio if desired, and serve warm.