Polymer−Surface Interactions in Bridging Escape and Localization Transitions