Cook the potatoes in a saucepan of lightly salted boiling water until just tender; be careful not to overcook. Drain, then leave to cool.
Rinse the spinach and drain off the excess water in a colander. Put in a dry frying pan over a medium heat with just the water clinging to the leaves from rinsing, cover and cook for 2–3 minutes, shaking the pan from time to time, until just wilted. Squeeze out any remaining water, then roughly chop. Set aside.
Heat the oil in a 20 cm (8 inch) nonstick frying pan with a flameproof handle (or cover the handle with foil) over a low heat. Add the onion and cook, stirring occasionally, for 8–10 minutes until softened. Add the cooled potatoes and cook, stirring, for 2–3 minutes. Add the reserved spinach and stir. Beat the eggs lightly in a bowl and season with salt and pepper. Pour into the pan over the vegetables and cook over a low heat, shaking frequently, for 10–12 minutes until set on the bottom.
Put the pan under a preheated medium grill and cook for 2–3 minutes or until the top is set and lightly browned. Remove from the heat and leave to rest for 3–4 minutes before turning out on to a chopping board. Cut into wedges and serve with plain or chilli ketchup.