Look at Germany, Italy, Balkans, etc. all have declining demographics ranging from slight to severe yet housing in their cities has gone up from slight to severe. Like everything in real estate, it's all about the location location location, so everything is localized not extrapolated to the whole country it's why demographics can be steeply declining but prices steeply going up in cities.
Unless you want to live in desolate villages with no infrastructure or jobs, urban housing prices isn't tracking demographics.
Edit: to downvoters, check the numbers please