Boil the potatoes in salted water for 5 mins until just tender. Drain well.
Add the onion to a medium saucepan and fry for approx 8 minutes until the onion are soft. Add the potatoes and sauté with the onions for a couple of minutes. Add garlic and then the spices and fry for a further minute. Remove from the heat.
Make the flax egg by adding the flax and water to a small pot. Leave for a few minutes.
Add all the egg mix ingredients to a food processor and blitz until smooth & creamy. Remove from the processor and stir in the peas.
Spoon the potatoes and onions into 1 large high sided loose bottomed cake tin or two medium loose bottom tart dishes greased with a little oil, then poor in the egg mix. Smooth out.
Bake on gas Mark 4/190c for 45–50 minutes (depending on your oven) until set and a little brown around the edges. Test that it’s set by inserting a skewer into the middle (just like a cake) if it’s clean when withdrawn it’s set. If not, pop back into the oven for a few more minutes, then test again.
Allow to cool before removing from the cake tin.