“In America, everybody gets a shot,” Mr. Biden said. “That’s what the next president of the United States needs to understand, and that’s what I don’t think this current president understands at all.”

He scorned President Trump’s new budget proposal, unveiled on Monday, which he said would cut Medicare and Medicaid “because of a tax cut for the super-wealthy that created a deficit of $1.9 trillion and now they got to go make somebody pay for it.”

Speaking to a union with a politically mixed membership, Mr. Biden also expressed unease with his own party’s drift to the left and the deep polarization gripping the country.

He lamented that a “mean pettiness has overtaken our politics” and said “we seem to be at each other’s throats” before again revealing angst at his party’s contempt for his instincts toward conciliation.

“I get criticized for saying anything nice about a Republican,” Mr. Biden said.

The former vice president, who was subdued for much of his speech, raised his voice as he neared the end of his remarks and implored the firefighters, who are in the capital for their own annual legislative conference, to remain optimistic about the country’s future.