Preheat the oven to 350°F. Move a rack to the middle position.
Roast the garlic heads on a baking sheet, root side down, until very soft, 30 to 40 minutes. Don’t worry if a bit of brown bubbles volcano-like from the top. Let the garlic cool until you can touch it, then smash the heads lightly to expose the pulp. It will ooze a bit over the knife or mallet; no matter, just scrape the pulp back onto the cloves.
While the garlic is roasting, cover the mushrooms with 1cup cold water. Weight the caps down with a saucer and let them soak until soft, about 30 minutes. Cut the caps with the stems intact into thick slices. Strain and reserve the soaking liquid.
Heat a heavy, non-aluminum stockpot over high heat until hot enough to evaporate a bead of water upon contact. Add the oil, swirl to glaze the bottom of the pan, then reduce the heat to low. Add the garlic, mushrooms, onions, carrots, ginger, scallions, and chilis. Stir to gloss the vegetables with the oil. Cover the pot tightly and let the vegetables sweat until they are very soft and soupy, about 20 minutes. Don’t rush the process; the longer they sweat, the better the stock will taste. Lift the lid occasionally to stir the vegetables and ensure against scorching, tilting the lid at an angle so the condensation slides into the pot.
Add the peppercorns, water, and reserved mushroom-soaking liquid. Stir to blend, then bring the mixture to a lively simmer over moderate heat. Adjust the heat to maintain a weak simmer and cook, uncovered, for 45 minutes. Add the lemongrass and simmer 15 minutes more.
Strain the stock through a large, fine-mesh strainer and let the solids drip their juices into the stock. Discard the solids. For a clearer stock, clean the strainer, line it with a double layer of wet cheesecloth, and strain the liquid again.