I've written previously about a world where the dungeoneering was an done by androids who were the remnant of human civilization (all that's here). Well, there's another way to get dungeons crawling with robots, and that's by having a future, post-apocalyptic world that's been overrun by them. Instead of apes, or fairies, or vampires, let the robots take over something like Screamers (and the Philip K. Dick story it's based on "The Second Variety"), Terminator, or Magnus: Robot-Fighter. Unlike those examples though, human civilization can have been pushed back to pseudo-Medieval levels.
Say the robots have moved mostly underground, leaving humans to limp along on a damaged surface world. The underground bases of the robots would be a lot like dungeons. Robots would have made various robotic or bio-robotic guardians--monsters, of sorts. Maybe the robots are even aliens? A post-sentient, techno-organic swarm that landed and buried itself into the earth, spreading underground like roots, building robotic creatures in a myriad of forms as it went. You'd have a whole underground ecology of robots. Add "magic" (really psionic powers in disguise) and you've got a fantasy world, or close enough.
For a real fantasy world, assume that the alien robotic swarm invaded a fairly D&Dish world (except with maybe less conflict to begin with).