A shortage means that the quantity demanded exceeds the quantity supplied. A shortage exists if the price is below the equilibrium. If the market is free, the shortage will disappear as the price increases. The shortage will continue anytime the market is not free; for instance, if the government has instituted a price ceiling. If the price ceiling is above the equilibrium, it is not relevant and has no bearing on the market.
Many cities have rent control laws to make sure that poor people can find apartments they can afford. But landlords do not find it profitable to rent at these prices and sometimes convert their buildings to condominium or cooperative ownership. This reduces the number of apartments available: it creates a shortage.