Can an instant spell deal damage to a creature after responding with hexproof?
No, the Shock will not deal damage if the target gains hexproof in response.

The reason is that target validity is checked both while you are casting the spell and as the spell starts to resolve. If the target becomes invalid, say by gaining hexproof, before the spell resolves, the spell will not do anything to that target, and if all of the targets are invalid, the spell will not do anything at all.