All attackers—not just the pinning creature—treat a pinned creature's Dexterity as 0 for determining the pinned creature's Armor Class
The Player's Handbook's glossary describes pinned as "held immobile (but not helpless) in a grapple." That immobility is represented by treating the creature's Dexterity as 0 for determining the creature's Armor Class.1
Thus, initially, the grappling creature and the grappled creature lose their Dexterity bonuses to Armor Class against attacks made by creatures not involved in their grapple (PH 156).
Then the pinned creature—who's also grappled as that effect has yet to be remedied—is treated as having a Dexterity score of 0 for determining Armor Class (PH 151), but the pinned creature is not paralyzed (as a creature with an actual Dexterity score of 0 usually is) (PH 304, 311), and the pinned creature is not helpless (PH 153).
Further, the pinned creature suffers an additional −4 penalty to Armor Class against attacks made by creatures not involved in his grapple (PH 156).2
Example
Arboc (base attack bonus +6 and usually Dexterity 13 and AC 20) and Baracs (usually Dexterity 16 and AC 17) are already grappling, making their Armor Classes, respectively, 19 and 14 against attacks launched by those not involved in the grapple.
Arboc, on his turn, wins an opposed grapple check at his full base attack bonus against Baracs. Arboc picks to pin Baracs. Baracs, now virtually immobile has his Dexterity for the purposes of determining his Armor Class reduced to 0, therefore an armor class of 9. Further, Baracs suffers a −4 penalty to Armor Class against attacks launched by those not involved in the grapple, making his Armor Class against those foes 5.
If this seems excessive, try imagining being pinned as failing a second saving throw against an effect. Since failing the first could've killed the creature, probably either grappling is the creature's specialty, the grappling creature wants the grappled creature alive, or nobody's casting spells.
Grappling is one of the primary reasons many high-level creatures have access to some kind of freedom of movement effect (e.g. the ring of freedom of movement (DMG 232) (40,000 gp; 0 lbs.)).
- The Rules Compendium defines immobilized as "An immobilized creature can’t move out of the space it was in when it became immobilized. It otherwise functions normally unless it’s flying. Immobilized flying creatures that have the ability to hover can maintain their initial altitude. All other flying creatures subjected to this condition descend at a rate of 20 feet per round until they reach the ground, taking no falling damage" (35). The RC doesn't link that condition to the pinned condition, however, stating separately that a pinned creature "can’t move, so its Dexterity is considered to be 0 for the purpose of determining AC (−5 modifier)" (35).
- I speculate this represents the pinning creature's ability to steer the pinned creature into oncoming attacks. D&D 3.X, so far as I'm aware, omits a grapple benefit that permits actively employing the pinned creature as a shield or as cover.
The spell does what it says it does, and the condition (Grappled) does what it says it does. Victor is flung 10'.
The spell moves Victor 10'. Clear enough. Unless something would stop that movement.
The condition doesn't cause Victor to be immobile, it reduces his speed to 0'. He's not nailed to the floor or encased in carbonite, it's just hard for him to move of his own volition. Grab someone by the wrist with both hands: you've got them Grappled.
So, since nothing in Grappled says Victor can't be moved by an effect (and, in fact, as you mention it specifically mentions this effect as one that can move the victim out of the grappler's grasp) and the spell says it moves Victor, that's what it does.
As long as the effect of Thunderwave ejects Victor from Gary's reach, Victor is no longer grappled.
(As @MartinCarney rightly points out, if Gary's an Otyugh, even 10' may not escape Gary's reach!)
Best Answer
Yes, you can make as many unarmed attacks as you can utilizing your Attack action, any Extra Attacks, or any Bonus Action1 against either or both of those grappled target.
If you want to attack them with unarmed strikes in the same turn that you have grappled them then you:
Be no smaller than one size smaller than your target (PHB page 195):
Use any remaining extra attacks or bonus action attacks to make your unarmed strikes.
Note the rules governing unarmed strikes that needn't require a free hand as they aren't a weapon, or that the strike be a punch. You may strike either target with your available knee, foot, head, mutant 3rd arm, etc.
PHB Errata V1 DTD 2015:
If you want to attack them on the round after you have grappled them, then all attacks you can use during your Attack action and any bonus action attacks can be used to make unarmed strikes against those grappled opponents.
1 - For clarity, I understand that, and intend to communicate that: a PC may only use a bonus action to make this unarmed attack if they have some sort of ability/feature/item that would grant them the ability to make it. One cannot simply decide to use a bonus action and punch/kick/head-butt something. Thank you various reputable users from the comment section for your helpful advice and discussion.