So I was thinking of adding a new furniture made of manure with "examine_action": "dirtmound" and buildable only on tile of type found underground. But I think it would allow to plant anything underground.
There is a piece of commented out code in iexamine::dirtmound that seems to check for ambiant light so maybe it’s possible to re-use that so that you can only plant mushroom in low light, but I don’t really know how to do it 