Preheat the oven to 220C/425F/Gas 7.
For the roasted vegetables, cut the red peppers in half, discarding the core and seeds, and place in a large roasting tin. Peel and cut the onions into eight wedges, and cut the courgettes into 1cm/½in thick slices lengthwise.
Add the onion and courgette to the roasting tin with the olive oil and roast for 20-25 minutes, or until the vegetables are charred and tender. Allow to cool, then peel away, and discard the skin from the red peppers and cut into bite-sized pieces.
For the salmon en croute, preheat a large baking tray in the oven.
Unroll one pack of pastry and roll a little longer until it is about 2cm/¾in larger all around than the piece of fish (check that it will fit on the baking tray, you may have to place it diagonally.) Place the pastry on top of a sheet of baking parchment so that you can easily slide the pie onto the hot baking tray. Place the salmon on the centre of the pastry and spread with the pesto, top with the courgettes and onion and lay the red pepper on top. Brush the edge of the pastry with beaten egg.
Roll out the second pack of the pastry to a rectangle slightly larger than the first one so that it drapes over the fish and filling. Carefully lift it over the salmon, trim off any excess and press the edges well to seal. Re-roll the pastry trimmings thinly and cut out pastry decorations if liked – such as little fishes. Brush the pastry with beaten egg.
Carefully slide the pie onto the preheated baking tray on the non-stick baking paper, and bake for 35-40 minutes, or until golden-brown both on top and underneath. Allow to rest for 10 minutes while you make the sauce.
For the sauce, gently heat the cream in a pan, and stir in the lemon juice and pesto. Remove from the heat and then stir in the basil just before serving.
Serve the salmon cut into slices, with the sauce.