Heat oil in a frypan over medium heat. Add onion and cook for 2 minutes or until soft. Add garlic and cook for a further minute.
Roll out 1 pastry block on a lightly floured board to 30cm x 20cm. Place on a baking tray lined with non-stick baking paper. Roll remaining pastry block until slightly larger.
Spread the first pastry sheet with pasta sauce. Top with onion mixture, then sliced meats. Scatter with mozzarella and basil, and season with salt and pepper. Brush exposed edges of the pastry with a little water, then place the second sheet on top.
Press down to seal edges, pinching them together with your finger and thumb. Brush top of the pastry with beaten egg. Bake for 25-30 minutes or until puffed and golden.
Cut into slices and serve with a green salad, if desired.