Slice the potatoes by putting them through the thin blade of a food processor or using a sharp knife. Put them in a bowl with the onions, cover with cold water and leave to soak for 15 minutes to remove some of the starch and soften the onions.
Heat the oven to 180°C (350°F, gas mark 4). Drain the potatoes and onions and pat them dry with kitchen paper. Arrange a layer of onions and potatoes in the base of a shallow ovenproof serving dish. Season with salt, pepper and nutmeg to taste, then repeat to make four or five layers in total, ending with the seasonings.
Stir the garlic into the stock, then pour it over the vegetables. Dot the top with the fat spread. Bake for 1 hour 30 minutes, or until the top is browned and the potatoes feel soft when they are pierced with a skewer. Leave the dish to stand for 5 minutes before serving.