Preheat the oven to 375° F. Lightly spray an 8x8-inch baking dish with nonstick cooking spray.
Trim the root ends, but leave the stem ends intact. Blanch the onions in boiling water for 30 seconds, then immediately transfer them to an ice bath. Once cool, pinch the stem ends gently — the skins will slip right off. (Skip this step if you are using frozen onions.)
Bring a saucepan of salted water to a boil. Add the peeled pearl onions and cook for 5 minutes, until just tender. Drain well and set aside.
In the same pan, melt 1/4 cup butter over medium heat. Add the onions and cook for 2 minutes, stirring occasionally.
Sprinkle the flour over the onions and stir to coat evenly. Cook for 1 minute, letting it absorb the butter and form a light roux.
Gradually pour in the broth, whisking until smooth. Add the heavy cream and stir constantly until thickened, about 2 minutes.
Stir in the salt, pepper, and nutmeg. Adjust seasoning to taste.
Transfer the mixture to the prepared baking dish. In a small bowl, combine panko breadcrumbs, melted butter, and Parmesan cheese. Sprinkle evenly over the top.
Bake, uncovered, for 15 minutes, until golden brown and bubbling. Let rest 5 minutes before serving.