The evolution of new housing construction over the last years https://www.pordata.pt/en/Portugal/Completed+dwellings+in+ne...
The number of conventional family houses in Portugal https://www.pordata.pt/en/Portugal/Conventional+family+housi...
My opinions: The housing market has been stagnant since 2010 while at the same time interest rates have been low. The population might not have risen a lot since 2010 but the usual trends of moving to city centers, people leaving their parents house (which keep the same house), people wanting new/bigger houses than their parents are still pressures present.
This means there's a big pressure in demand for housing which is not being met by supply which increases the prices. My speculation is that foreign investment has a very low impact in the housing prices, but it's just my speculation. Even if it's a considerable impact, the fix is always to increase supply of houses so that prices drop and we also get foreign investment.