Tip the onions and potatoes into a bowl and add the cheeses and cream. Taste and add a little more seasoning if it needs it. Gently stir together, then tip into the pie dish. Put the pastry lid on top and trim the edges so the bottom and top are the same size, then crimp with your forefinger and thumbs, to seal. Wash with egg, then bake at 190C/fan 170C/gas 5 for 40 minutes until deep golden. If freezing, cool completely, then cover and transfer to the freezer. To reheat, defrost in the fridge overnight, then heat the oven to 180C/fan 160C/gas 4. Unwrap the pie and reheat for 20-30 minutes until piping hot. Leave for 10 minutes before cutting into wedges.