In a large, heavy saucepan, heat the oil over medium heat. Cook the onions, stirring often, until soft, about 10 minutes. Put aside until assembling.
To make the Béchamel:
In a medium saucepan over medium heat, melt the butter until foamy. Add the flour and cook, stirring constantly, until the mixture is foamy, about 3 minutes. Gradually add the milk, stirring until smooth. Cook, stirring, until the sauce is thick, about 3 minutes. Stir in the nutmeg and salt and pepper to taste.
To make the Gratin:
Preheat the oven to 400°F (200°C).
Butter a gratin dish. Put a ½ inch layer of sliced zucchini, followed by the bechamel, and caramelized onions. Top with another ½ inch layer on zucchini slices. Sprinkle the cheese and dot with the butter.
Bake the gratin for 30 minutes, or until golden brown.
Sometimes I add wilted greens (spinach, kale, broccoli rabe, etc). Add whet you enjoy eating.