This dish can be assembled 1 day ahead, covered, and refrigerated, then baked when ready to serve. If desired, substitute already peeled frozen pearl onions for the fresh onions and skip the blanching and peeling steps.
Preheat the oven to 350°F. Drop into a large saucepan half-filled with cold water:
Bring to a boil and blanch for 1 minute. Using a slotted spoon, remove the onions and peel, then return to the boiling water. Simmer until tender, about 10 minutes. Drain, reserving ⅓ cup of the cooking liquid. Butter a shallow, 8-inch square baking dish and, if desired, line the bottom with:
Transfer the onions to the baking dish and set aside.
Prepare:
Pour the mixture over the onions and sprinkle with:
Bake until bubbling, about 15 minutes. Sprinkle with any or all of the following: