The price of the Habitats increases gradually as you build Habitats for that element. 
For example, the third Terra Habitat will always be cheaper than the fourth Terra Habitat. 
The same thing is true with improvements to the Habitats. 

This means that the third large Terra Habitat will always be cheaper than the fourth. 

At the same time, the longer it takes to unblock a certain element, the more expensive the Habitat will be for that element (provided that we have the same number of Habitats for the two elements we are comparing). 

For example, the fourth Metal Habitat will always be more expensive than the fourth Terra Habitat. This is how we ensure that the price of the Habitats keeps adjusting as we progress in the game and that the level of difficulty remains constant.