This is not even close to the only problem. Our housing stock has not kept up with population growth, which is a big reason why housing prices have been so out of control here. It's not due to a lack of competition so much as regulation and population growth that has outpaced building capacity.
So I'm not sure I can agree that that graph looks fine. It's true that we need immigration to balance falling fertility rates, this needs to be balanced by the available resources so the cost of living doesn't spiral out of control. Labour shortages can often be addressed in others ways, like automation.
Housing stock I really do think is down to regulation - it’s crazy hard to build here in Vancouver, even right near mass transit stations.
Should we have increased the ability to compete in housing and groceries before the influx of immigrants? Maybe. But I don’t think having them here makes these issues harder to address, and it might increase the pressure to actually take action. Every party is talking about cost of living now.
At least not without paying construction workers a whole lot more in order to compel the software developers away from developing software and into building houses, but then that only drives the cost of housing even higher!
I expect the answer is because nobody actually wants to live in such dwellings. They might accept rent in a place like that if they see it as a stop-gap until they can move into their "dream home", but it is not the home they are willing to commit to and build (obviously there are exceptions).
The claim that immigration is the only option is a fallacy peddled because it's the lazy short term option and "Après moi, le déluge" [1]
[1] https://en.wikipedia.org/wiki/Apr%C3%A8s_moi,_le_d%C3%A9luge
I think the third option could be further broken down: 3a) increase the working age population via a well planned immigration strategy that includes necessary infrastructure spending (medical residencies, housing, etc etc) to support that immigration 3b) open up the floodgates with absolutely no planning for the consequences whatsoever and then blame everyone else for the ensuing inflation and societal stress.
Unfortunately our current government chose 3b.
As Canada has grown rich, our fertility rate has gone down. I have no moral problem with that, but it does cause a problem: as the population ages, the ratio of workers (who pay tax) to retired people (who carry a tax burden) shrinks. The options are increasing the taxes on workers, cutting the benefits to the retired, or increasing the working age population via immigration.
As to grocery stores, housing prices, etc. I think these problems are more related to a lack of competition. A free market can handle an influx of consumers.