The current page’s query object should be available within a Customizer object’s active & sanitize callbacks through get_queried_object(). Through that you can get everything you need. This means the Customizer labels and values have already been set though. You can only manage whether the Customizer object is visible or not and if the new value is valid or not. The labels need to be generic enough for any particular page. The value is stored in options in the same place regardless of query.
The Customizer isn’t set up to manage settings the way you want. What you’re expected to do is have a separate setting for each template and manage which is visible with the active callback. Each template would get it’s specific setting through get_option() or get_theme_mod(), all saved in options, not post meta.
You could also store any new value anywhere else you want during the sanitize callback and the template could use that value instead of the one returned by get_theme_mod(). The value saved in options would reflect the last value saved, whether it relates to the current template or not. You could work around this by using JavaScript to set the applicable value regardless of what was output from the value in options. Any labels could be customized this way as well.
This begs the question how does JavaScript know what the page ID is and what values to set? I’m not sure. Your best be would be to register/enqueue the JavaScript that does this substitution. Use the handle thus established to pass values with wp_localize_script() from within the setting’s active callback. I’m not sure if the active callback fires early enough for this to work. Or you could try directly outputting the JS value assignment within script tags from active callback. I’ve no idea if that would work or where the output ends up, if anywhere. Something to try anyway?
Alternately, utilize selective refresh to correct the display. You’re supposed to be updating part of the preview this way, but you can update any part of the DOM. Getting the query data is still the challenge when relying on active callback to set the needed values. But JavaScript has access to the DOM and the preview should have the page ID available as an attribute somewhere. If what you need is not available in the DOM, you could probably get it through Ajax requests.
If all else fails, fall back to multiple settings and managing visibility. Good luck!