The nation’s biggest bank said it sees little to no signs of a recession in its businesses. It’s preparing for one anyway.

In the second quarter, JPMorgan Chase & Co. customers continued spending despite rising inflation, businesses continued borrowing and loan losses remained practically nonexistent. But executives said there remains more uncertainty than normal, dragging down big corporate activity and leading the bank to set aside more funds for potential future loan losses. That hurt its profit, which fell 28% in the quarter.

JPMorgan’s performance is typically viewed as a barometer on the broader economy given the bank’s insights into consumer and corporate financial health. Its second-quarter results, released Thursday, didn’t provide much clarity on whether the economy is headed for a downturn.

“The current news is actually quite good,” Chief Executive Jamie Dimon said Thursday. “When you make a list of potential issues going forward...it could be a soft landing or a hard landing. You do have a serious set of issues out there.”

For months, Mr. Dimon has been warning that a convergence of unprecedented factors could wreak havoc on the economy.

The Federal Reserve has been aggressively raising interest rates to try to slow the fastest inflation in 40 years. Investors are increasingly concerned that the Fed will be forced to tip the economy into a recession to curb rising prices.

But while consumers say they are concerned, they are still spending, padded by a strong hiring market, wage growth and the lasting effects of pandemic stimulus packages.

Add in the global impacts of Russia’s war in Ukraine, and Mr. Dimon has called it an “economic hurricane.” It just hasn’t arrived yet.

“The truth of that is we’ve looked very carefully into the actual data and results and there is essentially no evidence of any weakness in the actual results,” Chief Financial Officer Jeremy Barnum said about the economy. “The questions are about the outlook.”

Morgan Stanley executives echoed the uncertainty in its second-quarter results Thursday.

“If I had to use one word to describe it, it would be ‘complicated,’ ” Morgan Stanley Chief Executive James Gorman said about the economy, citing the effects of inflation and geopolitical turmoil. However, he added, “It is not 2008 complicated.”

JPMorgan’s profit was $8.65 billion, down from $11.95 billion a year ago. Morgan Stanley’s profit dropped 29%, to $2.5 billion.

Revenue rose 1% at JPMorgan and fell 11% at Morgan Stanley. Both banks missed analysts’ expectations for per-share earnings and revenue.

JPMorgan shares fell 4% to $107.03 around midday Thursday, their lowest point since November 2020. Morgan Stanley fell about 1% to $74.27. Markets slid broadly as well, with the S&P 500 on track for its fifth day in a row of losses.

JPMorgan also said it was temporarily suspending stock buybacks to build up its capital. Last month’s annual stress tests showed the biggest banks would survive a severe economic recession, but their performance meant several have to hold more reserves.

Spending on Chase credit cards rose 21% from a year ago and 15% from the first quarter. That growth included spending on travel and dining. Executives said that appeared to be evidence inflation wasn’t having much of an impact.

Chase customers also started carrying more credit card debt, with card loans up 17% from a year ago. But executives also said most customers still have higher cash balances than they did before the pandemic. And fewer card loans were in trouble or written off than a year ago.

Wealthy clients also continued borrowing and investing, even as the stock market dropped. At JPMorgan’s asset and wealth management division, loans were up 10%. The number of retail-trading clients at Morgan Stanley was 7.8 million at the end of June, up from 7.6 million in the first quarter, though on average they placed fewer trades.

There was a slowdown in big-ticket consumer loans, with mortgage originations down 45% and auto loan and lease originations down 44%. Higher mortgage rates in the quarter—a byproduct of the Fed’s rate hikes—crimped refinancings across the industry and pushed some would-be home buyers out of the market.

Like those of other big U.S. banks, JPMorgan’s customers tend to be well-off consumers. Mr. Barnum said the one spot of potential concern are lower-income customers, who have started spending their cash buffers a bit faster. There is also evidence that consumers with low credit scores are starting to fall behind on loans.

“If you wanted to try to look for early warning signals, that’s where you would see it,” Mr. Barnum said. “But I think there’s really still a big question about whether that’s simply normalization or whether it’s actually an early warning sign of deterioration.”

Big business clients are showing more wariness about the future than consumers, with many corporate chieftains staying on the sidelines.

Investment banking fees dropped 54% at JPMorgan and 55% at Morgan Stanley, reflecting a slowdown in corporate deal making and stock sales from last year’s feverish pace.

Mr. Barnum said there remains a pipeline of deals JPMorgan bankers are working on, but warned a challenging environment could mean they don’t pan out.

Morgan Stanley CFO Sharon Yeshaya said board meetings among the bank’s corporate clients are being dominated by the company’s own outlook and budget instead of assessing the broader landscape for deal opportunities, which slows deal activity.

Still, trading divisions benefited from volatile markets and interest-rate swings. Trading revenue rose 15% at JPMorgan and 21% at Morgan Stanley.

At JPMorgan, loans to the biggest clients in the investment bank increased 8% and loans to middle-market businesses in the commercial bank increased 10%.

“Businesses, when you talk to them, they’re in good shape, they are doing fine,” Mr. Dimon said. “We’ve never seen business credit be better in our lifetimes.”

Write to David Benoit at david.benoit@wsj.com