Cut the pastry in two and roll out each portion to a rectangle to fit 25x35cm shallow baking tin (Grundy tin). Lift the pastry into the tin, pressing it up the sides, trim the edges of the pastry if necessary. Repeat with the other portion then refrigerate until needed.
Preheat the oven to 200°C (180°C for fan assisted)/400°F/Gas Mark 6.
To make the filling, cook the onions in the oil until softened and golden. Cut the cooked potatoes into small dice. Spread the onions between the two pastry bases, scatter over the potatoes then add a layer of peas and sweetcorn.
Beat the milk and eggs together with seasoning, pour over the vegetables, scatter with cheese and bake in the oven for 30-40 minutes until set and the top and pastry are golden.
Cut each tart into 12 portions and serve with salad.