Pope Francis was asked about corruption, which can be even more devastating to a country than outright violence.
President Trump's move this month to end the five-year-old program instituted by President Obama plunged nearly 800,000 young people, known as "Dreamers", into uncertainty.
Pope Francis told the crowd outside St. Peter Claver Church that the two stops "have done me much good because they demonstrate how the love of God is made visible each day".
Francis said he was grateful to both Italy and Greece for having welcomed so many migrants in.
No good options against North Korea
The US has accused North Korea of "begging for war" and repeatedly urged China to step up pressure against its neighbour. A fire department official in Seongju said 38 people, including six police officers, were injured, none seriously.
The second gesture was in Cartagena, during the last day of travel.
"This woman became a model for all those who, in different ways, seek to restore the dignity of our brothers and sisters lost through the pain of life's wounds, to restore the dignity of those who are excluded", the pope said.
"Then", he said, "decide and history will judge the decisions".
He recalled recent news reports about the disappearance of ice in the Arctic, and referred to recent studies "that said we have only three years to turn back, otherwise the consequences will be awful". Pope Francis asked reporters.
Francis had refrained until Sunday from speaking out about the political and humanitarian crisis next door in Venezuela.
The Pope went to the journalists' section of the plane still wearing a small bandage on his left eyebrow and sporting a large bump, which had turned black and blue, on his cheek. On the flight back to Rome, turbulence cut short the traditional inflight press conference, but the Holy Father managed to answer a number of questions on current issues, including climate change, immigration, and the ongoing crisis in Venezuela.