By Konrad Putzier

Despite tumbling real-estate values during the coronavirus pandemic, it has been hard for buyers to find buildings for sale as most owners hold out. That has sent some scurrying to acquire shares in public real-estate companies and bonds.

A handful of big investment firms, including Blackstone Group Inc., Starwood Capital Group and Oaktree Capital Management, have been buying securities backed by real estate, according to public filings or people familiar with the matter.

These firms are betting that public markets are too pessimistic about the pandemic's impact on property owners. Some of these purchases have already produced handsome returns as part of markets' recovery from their spring low.

Ronald Dickerman, president of real-estate investment firm Madison International Realty LLC, said his firm bought tens of millions of dollars of shares in real-estate investment trusts in March and April. At the time, shares of some major REITs were down more than 50% for the year, amid widespread concerns that the pandemic would lead to falling property values and missed rent payments.

The shares of Mack-Cali Realty Corp., a New Jersey-based office and apartment owner where Madison was already an investor, fell below $14 in early April, but Mr. Dickerman calculated that the company's real estate, minus debt, was worth almost twice that.

"So we backed up the truck and we bought every share we could find at $14," he said. Mack-Cali's share price is up about 18% from its May low. Mr. Dickerman said he plans to hold on to the shares, betting on a further increase. Madison also bought shares in Capital & Counties Properties PLC and other public real-estate companies.

"These are opportunities that just don't exist in the private markets," Mr. Dickerman said.

Investors are turning to securities in part because buildings for sale aren't readily available. The number of commercial real estate deals in the Americas was down 33% in the first 150 days of the year, compared with the same period a year earlier, according to Real Capital Analytics.

Property markets move slowly, and many owners prefer to wait and see if prices recover rather than sell at a loss. Banks are letting borrowers defer mortgage payments, putting owners under less pressure to sell. While most observers expect an increase in mortgage defaults and distressed real estate sales, they expect it to take time.

Blackstone and Starwood Capital bought shares in Extended Stay America Inc., an operator of extended-stay hotels, during the spring, according to people familiar with the matter.

"We are already seeing actionable opportunities appearing from the dislocation, initially in structured credit and liquid markets," Blackstone President Jonathan Gray said during an April earnings call. The company has bought more than $2 billion in real-estate stocks since the pandemic started, according to a person familiar with the matter.

SL Green Realty Corp., meanwhile, sold more than $900 million of real estate stakes and debt holdings since April and is using the money to buy its own shares, which it considers undervalued.

Investing in public real estate comes with its own risks. Stock and bond prices tend to swing more wildly than private real-estate values, and bad economic data or an uptick in missed rent payments could send markets down again because these shares tend to move in tandem with the broader markets.

Earlier this year, some mortgage REITs were forced to sell their holdings in commercial mortgage-backed securities after a rapid drop in prices led to margin calls from their lenders.

That turned into an opportunity for others. On April 2, TPG RE Finance Trust Inc. sold $572 million in real estate collateralized loan obligations, a type of mortgage bond. The buyer, according to people familiar with the matter, was Oaktree Capital Management. About a week later, the Federal Reserve said it would start buying a broader range of commercial mortgage bonds, including bonds not backed by Fannie Mae or Freddie Mac. That helped the market to rally.

New York-based real-estate investment firm Somera Road Inc. has bought about $60 million in commercial real estate debt since March and CMBS accounted for 40% of that number, according to Ian Ross, the firm's managing principal.

Many of these purchases were made in late March, when mortgage REITs and other leveraged lenders were under pressure to sell and prices were low. The market rebound led to "phenomenal" returns, Mr. Ross said. But he is worried that some CMBS prices have risen too high and that other investors are underestimating the scale of the crisis facing the commercial real-estate sector.

"We're going to see a lot of defaults, both on the tenant and on the borrower side," he said.

Write to Konrad Putzier at konrad.putzier@wsj.com