Pope Leo XIV warned against rising political polarization and divisive identity narratives during a historic visit to Spain.