I worked on a design team to create a Lunar module scale model at school this past year. Ours was around 1/3 of full size. It cost us around 10,000 dollars before labor. If we were to scale this up and actually make a viable module, I would expect around 50,000 before labor and launch costs. I may be mistaken, but I don't believe the necessary information exists to validate this number. However, here is a link to one of NASA's proposed modules to get a sense of scale. Habitat modules could vary in size, shape, and instrumentation pushing costs potentially as high as 200,000 before any fancy research equipment. Now it is worth noting that my project was not a full habitat and rather an attachment to a habitat. Additionally, these estimates don't take into account a fully autonomous system. It depends on what you mean by fully autonomous. The 50,000 would probably be able to do some basic heat management but not much else. If we develop a full habitat, I would guess it would be pushing closer to 500,000 and potentially more.
For the purposes of this question, I will say 500,000 in material costs for a small volume build. The design of this module would likely take a small team of ~10 engineers around 3 or 4 years to design based on aerospace administrative constraints. My guess is that this is a very conservative development cost. Let's say that these engineers make 40 dollars an hour This puts us at $2000*10*40*4$ which puts us at a total cost of 3,200,000 is development costs. Now I'm no economist and estimating the true production cost for high volume is difficult, but I believe it would be possible to get the production costs down to between 200k-300k per module including labor. Tacking on the development cost, which becomes negligible if we produce 1,000,000 units, I would expect them to market for around 500,000.
Sorry I can't give a better answer. Much of that is educated speculation unfortunately. Also, if anyone knows how to tack on the dollar symbol, please edit my response and add them or let me know how to do it.