Cut the chard into strips, cook in salted boiling water for 10 minutes and drain. Cook the macaroni in boiling salted water, rinse, drain and toss in butter.
Put half of the pasta in a greased baking dish. Top with diced ham and well squeezed Swiss chard. Season with salt, pepper and nutmeg. Layer the remaining pasta on top.
Whisk eggs with milk, salt and pepper and pour over the casserole. Scatter parmesan on top and top with flakes of butter. Bake in the oven at 200 ° C (fan oven 175 ° C) for 40 minutes.