I took a pair of shoes like this to a cobbler and he explained that the glue had broken down in some foundational part of the shoe. Take them in and have them assessed to find out where the issue is and then have them either resoled or re-glued. I recommend North 11th shoe repair in Williamsburg.