But since the Pathfinder system averages out the typical skill DCs between characters of all skills, Pathfinder characters that put a lot of ranks into a skill are much better than their D&D counterparts.

In Pathfinder, a level 1 "moderately challenging" DC is 15. A player with ranks in a class skill can have a +6 (60% chance) while a player with no ranks in it has a +1 (35% chance).
But at level 18, a "moderately challenging" DC is 30. A player with points in the skill can easily have a ~27+ (including magical items, feats, etc: >90% chance) while the player with no ranks has a +6 (0% chance). Even players with a few ranks will have maybe a +12, which is still only a 15% chance.

Whereas in 5e, normal level 1 characters (ignoring rogues/expertise) will have a +5 bonus to certain skills and +1 to some others (55% and 35% chance again to hit DC 15).
At level 18, these same skills will have bonuses of +12 and +2. Let's say the DC for a similarly difficult check goes up to DC 18. This is a 75% chance for the skilled player and a 25% chance for the unskilled.

In sum, higher level 5e characters have a lower chance of success for skilled checks than their Pathfinder counterparts, and the difference between unskilled and skilled 5e characters is less than Pathfinder characters. Thus, rng matters more in 5e.