Scrub the potatoes, or peel if you wish, then grate coarsely in long, thin shreds. Put the grated potatoes in a sieve over a bowl and let them drain for 20 minutes.
Trim the spring onions, discarding only the roots and tough ends of the shoots, then slice them finely. Season with salt and black pepper, then stir into a bowl with the drained potatoes and the flour, nigella seeds and beaten egg.
Warm the oil in a 22-25cm nonstick frying pan, keeping the heat no more than moderately high. Place the potato mix in the pan, spreading it out to fill the base. Don’t be tempted to smooth it flat. The cake is lighter if it isn’t compacted.
Let the potato cake cook for 8-10 minutes, regulating the temperature when necessary until the base is crisp and golden. Check its progress by lifting up the edge with a palette knife or slotted slice.
Carefully turn the cake over either by lifting with a large metal slice or palette knife, or by placing a plate over the top of the pan and, holding it tightly in place, carefully flipping the pan over, then slide the cake back into the pan.
Leave to brown lightly on the underside. Finely grate the cheese over the top of the potato cake leaving a rim around the edge. Place a lid over the pan, remove from the heat and leave for 5 minutes for the cheese to melt.
Chop the herb leaves and scatter over the cake. Cut into slices and serve.