Halve the onions or shallots lengthwise, discarding the papery skin, as well as the layer beneath if it is tough or dry. Trim the tops and a little off the bottom (not too much—you want to ensure the onion halves stay held together at the base).
In a medium bowl, whisk together the melted butter, miso, and warm water until fully combined.
Place the onion halves, cut-side down and spaced apart, in a 9x13-inch (23x33-centimeter) high-sided baking dish or pan and pour in the miso water. Cover tightly with aluminum foil and bake for 35 minutes, then remove the foil and turn the onions over so they are cut-side up (take care to ensure they remain intact). Baste the onions very well, then return to the oven, uncovered, for another 45 to 50 minutes, basting every 10 minutes, until the onions are very soft, deeply browned on top, and the sauce has reduced to a gravy consistency.
Carefully transfer the onions to a platter, pouring the sauce over and around them, and serve at once.