Simply, if you charge directly into an enemy, they won't take any damage and be pinned for the rest of the charge; if you only just graze them, they'll take 50 damage and be knocked back, just like what would happen if you charged into them after pinning another enemy. All of this seems to completely ignore relative height, i.e. there's no vertical graze boundary, and you'll always pin an enemy even if you're just touching their foor or their head, but this scenario is harder to find in regular gameplay.
Imagine, if you will, a spherical Reinhardt, and visualize how enemies' bodies would react to a 200+kg metal ball flying at them. If the enemy were to only touch one side of the sphere, they'd take damage from the hit, of course, but they'd be pushed aside instead of dragged forward. Now if the Reinball were to hit an enemy directly head on, so their body was directly in the way of the center of mass of the sphere, they'd be moved in the same direction as Reinhardt is, dragging them along for the charge. I know it's somewhat of an abstraction, but it works very well to get an idea of how pinning works. I've made a diagram to explain what I mean:
Of course, this is all based on my experience, but it seems like an accurate model.