For the herring casserole, gut and bone the herring. Trim the head, tail and fins. Place in a bowl and soak in cold running water. Soak in milk for 10 minutes to desalt them.
Press the cooked, peeled potatoes through a potato ricer.
In a bowl, whisk 40 g butter and egg yolks until thick and creamy. Stir in salt, pepper, allspice and nutmeg and the potato mixture. Brown peeled, chopped onions in the remaining butter in a frying pan until golden. Also add to the mixture.
Chop the watered, patted dry fish into small pieces and mix into the mixture. Beat the egg whites until stiff and fold them in.
Pour the casserole into the dish, sprinkle with breadcrumbs and cheese. Pour butter flakes on top and bake in the preheated oven for 60 minutes at 240 degrees (gas mark 6).
Serve the herring casserole hot.