TORONTO, Aug 10 (Reuters) - Shares of Manulife Financial rose on Thursday after a rebound in insurance sales and profitable investment returns in their wealth unit powered an earnings beat, but Canada's top insurer flagged risks from its office real estate exposures.

Manulife late Wednesday said core earnings for the second quarter were driven by gains from its investments, benefiting from the higher rate environment and very low credit loss.

Earlier this week, rival Sun Life Financial Inc also reported better-than-expected earnings.

Manulife benefited from strong insurance sales in Asia, their biggest growth market, as mainland Chinese customers returned to Hong Kong to buy policies after the borders reopened for the first time since the pandemic.

Manulife shares were up 2.4% on Thursday and Sun Life fell 0.6%, while the benchmark Toronto share index gained 0.5%.

But both Manulife and Sun Life warned of more pressure in their commercial real estate investments in the coming quarters as many offices have shifted to a hybrid work model and have downsized their office areas.

"Right now we're on the downward part of that cycle. It is hard to predict future return, but we do expect a little bit more weakness in office," Sun Life's Chief Investment Officer Randy Brown said.

Manulife said its most recent valuations of its U.S. office portfolio reflect about a 30% reduction from peak and it has significantly lowered its exposure to North American offices over the past 10 years.

Insurers invest in real estate as a part of their wealth and asset management business and were optimistic about the market recovery.

"The question going forward everyone is trying to figure out is: Are we done? And we do feel like the majority of that rising (capitalization) rates is done, but it may not be fully done," Manulife's CIO Scott Hartz told analysts.

While the core insurance business did well for both, Edward Jones analyst James Shanahan said he was disappointed with the investment flows at Sun Life in particular. Sun Life's wealth and asset management unit was the only segment to show a fall in underlying net income as higher investment income was offset by lower fee-based earnings.

"Both these companies are putting up pretty strong levels of profitability... the disconnect here is the valuation," he said.

Manulife trades 7.58 times its 12-month forward earnings, compared with Sun Life which trades 10.25 times, according to Refinitiv data. The industry median is 8.8 times.

Manulife shares have gained 6.4% so far this year while Sun Life has risen about 8%. (Reporting by Nivedita Balu in Toronto; Additional reporting by Medha Singh in Bengaluru; Editing by Chris Reese)