Apparently its not exactly about habitat. This kind of sexual dimorphism in which the female is several times larger is usually rare, being more observed in some spiders and in 5 out of the 11 anglerfish species we know.
In the latter, the males are essentially sexual parasites, using its eyes and/or nostrils to find the huge females. After that, they latch onto them, usually in the underbelly, and basically fuse with the female, connecting tissues and bloodvessels and becoming completely dependent on them to survive.
In spiders as this article speaks (unless I understood something wrong), the difference in size seems to be mostly due to opposing selecting pressures to each sex, but this can't exactly be considered the only reason, with other factors like sexual selection and gravity hypothesis (smaller males can climb better and reach the females more easily) also being applied. Other factors like why in some species there's virtually no difference and in others the males are clearly smaller aren't quite clear yet.
Overall, it'd seem like it's not a matter of biome, as these 2 cases clearly have little to no similarities other than the extreme size. This seems more related to behavioral patterns, sexual selection and, possibly, different lifestyles (see harpy eagles, although their size difference isn't nearly as pronounced, it exists, and allows for a difference in prey, with the smaller and faster male hunting smaller, yet more agile prey, while the heavier and stronger female hunts larger prey, with both facing very little competition from one another normally). But it'd seem like a development in which mature males act as sexual parasites towards the females, as we see with the angler fish, or in which both adapt for extreme differences in type food they eat should be a strong motivator (a comparative yet very unlikely herbivore example could be one in which smaller males exclusively eat grass while much larger females feed on the leaves of trees, although we'd need to watch for the necessary adaptations that'd allow for reproduction despite such a difference in size and weight).
The main issue here for your ecosystem to work is the 50:1 ratio. For this to allow you're essentially stuck in scenarios in which the male is much smaller than the female, and it's her which will limit the max size. It's unlikely we'll have a scenario in which the male is, for example, the size of a bull. And that is not mentioning how not even spiders usually have such drastic levels, so we'd essentially need an ecosystem in which basically all males attach to females after reaching sexual maturity and convert into a spermsack for sexual reproduction to work, or have other similar methods to transfer sperm.