Heat the oven to 400°F and arrange a rack in the top third.
Melt 2 tablespoons of the butter in a large frying pan over medium heat. Add the onions and thyme, season generously with salt and pepper, and cook, stirring rarely and adjusting the heat as needed, until golden brown, about 35 minutes. Meanwhile, roast the mushrooms and toast the bread.
Set a wire rack over a baking sheet. Clean the mushrooms and remove the stems (no need to scrape the gills). Brush both sides of the mushrooms with all of the oil and season generously with salt and pepper. Arrange the portobellos cap-side down on the rack.
Roast the mushrooms for 8 minutes. Flip and roast until they just give way when pierced with a knife but still hold their shape, about 8 minutes more. Set the baking sheet aside to let the excess liquid drain from the mushrooms.
Place the remaining tablespoon of butter in a medium microwave-safe bowl and heat until melted (alternatively, melt it in a small saucepan over low heat). Cut the bread into 1/2-inch cubes, add them to the bowl, season with salt and pepper, and toss to combine. Transfer the cubes to a second baking sheet and spread them in an even layer (reserve the bowl—no need to wash it). Bake until toasted and golden brown, stirring halfway through, about 10 minutes total.
Transfer the toasted bread to the reserved bowl and set it aside (reserve the baking sheet—no need to wash it). Turn the oven to broil.
When the onions are ready, add the sherry and cook, stirring occasionally, until completely evaporated, about 1 to 2 minutes. Remove from the heat, taste, and season with additional salt and pepper as needed.
Place the mushrooms cap-side down on the reserved baking sheet. Divide the onions over the mushrooms. Divide the toasted bread over the onions and use your hands to gently press the bread into an even layer. Sprinkle the mushrooms evenly with the cheese.
Broil until heated through and the cheese is melted and starting to brown in spots, about 2 minutes. Serve immediately.
Mothers Secret Recipes of Comfort Food & Culinary Inspiration from an Organic and Allergen-free Approach