At an event in New York, the president said federal investments in climate action would be at risk if former President Donald J. Trump retook the White House.