I see what it is. The second grouping (Group-Object -InputObject $_.Group -Property {$_.CustomFields[$caJob]}) is returning null in the Name property, so the code basically stops executing there since the if statement is going to be false. What's also funny is the formatting in tabular form. If I check this snippet in ISE, the "Group" name have VMs formatting without comma separation (like not an array?) versus if I just execute the first Group-Object statement.
Get-VM-Namevm-*|Group-Object-Property {$_.CustomFields['deployment']} |where {$_.Name -like'service-instance_*'} |ForEach-Object-Process {Group-Object-InputObject$_.Group -Property {$_.CustomFields['job']}}