Mr. Bloomberg has benefited, however, from being mostly ignored by his primary rivals, some of whom don’t want to elevate him in the race, but also don’t want to alienate him and his ability to support the Democratic nominee in the general election. And most Democratic strategists remain skeptical that a candidate who once supported aggressive policing policies, who has switched parties three times and who endorsed President George W. Bush in 2004 will be able to win the nomination.

From Mr. Trump’s son-in-law, Jared Kushner, to Brad Parscale, his campaign manager, to his polling team and other advisers, the president has been told repeatedly that Mr. Bloomberg isn’t worth his attention.

Meanwhile, even for some Democratic observers who are uncomfortable with how much money Mr. Bloomberg is flooding into the system, there is a relief in watching the candidate get into Mr. Trump’s head in a way that few have.

“Trump fears Bloomberg because Bloomberg is actually the guy who Trump played on TV — a fantastically wealthy, self-made success with unlimited resources and a willingness to spend it,” said David Axelrod, a former senior adviser to President Barack Obama.

The Trump campaign played down any worries about Mr. Bloomberg.

“It’s a free country and he can set his money on fire if he wants to,” said Tim Murtaugh, a campaign spokesman. “He’s still in a statistical tie with the back of the pack in the Democrat field.”

The Trump campaign is dismissive of the idea that Mr. Bloomberg could be an ongoing threat as anything other than the nominee, despite his pledge to spend to support the Democratic standard-bearer through Election Day. And officials have taken note that Mr. Bloomberg’s team is trying to mirror the Trump campaign’s playbook with online spending.