There are a few, mostly with caveats
I struggled with the same question.
A Cleric with Harmful font and the Sorrow domain seems the best combination, unless you play in an undead-heavy campaign. But then you'd just prepare lots of Heals, and use 3 actions to cast them. The new Divine Wrath is also great on higher levels.
Arcane and primal casters have access to Scorching Ray, which scales nicely, but does nothing on a miss, and is limited in 3 targets.
On higher leves (15+) however, they can be significantly better then Clerics at party-friendly blasting.
Divine Wrath (rank 4, divine):
If the whole party is Good, and the enemy is Evil1, only they take damage. Neutral creatures treat the saving throw as one degree better.
Remaster update: now it deals spirit damage to enemies only.
Needs a feat
Harm (rank 1, divine): If you take the 6th level feat Selective Energy, you can avoid [Charisma mod] targets when casting the 3 action version. Not the greatest spell, but Clerics with Harmful Font can cast quite many of them per day.
Needs careful positioning
Cinder Swarm (rank 4, arcane, primal): only hurts enemies. 1 if you are unlucky, more if the enemy is stupid, or the party is good with forced movement.
Not really party friendly, but easier to target than usual
Blister (rank 5, arcane, occult, primal): It is a 15 cone in 60 feet, that also damages the source of the cone, so should be quite easy to damage 3 enemies with it while not hurting your allies. Not great damage, bad scaling and strange action economy (needs 3 actions in the first round to actually deal damage, but might2 deal similar damage later for 1 action).
Coral Eruption (rank 4, arcane, primal): Two 10 foot bursts can easier include 3 enemies while avoiding your allies than a 20 foot burst (Fireball). Unfortunately the damage type and amount is far from great.
Not really party friendly, but much higher damage to the right enemies
Holy Cascade (rank 4, divine): Do not use it against anything but undead and fiends. But in this case, your friends likely take 1/3 damage compared to the enemy, and the spell will trigger the most likely weaknesses.
Not really damage
Blistering Invective (rank 4, occult): It is actually a second rank spell, but it only targets more than one enemy when heightened. I love the concept, but the spell is far from great; fire is among the most resisted damage types, it is semi-linguistic, and it causes persistent damage, which should be started as early as possible, but as you said, in the first round the enemy has usually not intermingled yet. Probably best taken by characters with terrible Initiatives (which luckily includes most classes with occult spells)
Just so we have everything in one place.
Implosion (rank 9, arcane, primal): It is party friendly, but can only damage one enemy per turn. Only resist all works against it.
Horrid Wilting (rank 8, arcane, primal): The gold standard of party-friendly blasting. Can wipe out a small army with it.
Chain Lightning (rank 6, arcane, primal): Start with the lowest ranked or clumsiest enemies, as it stops at the first Critical Success.
Rejuvenating Flames (rank 1, Sorcerer): Not much of fire damage in a small cone, but your allies in the area are healed by it. The bloodline (Phoenix) is uncommon.
Sepulchral Mask (rank 1, Sorcerer): Not much damage in a tiny emanation, and many things are immune to mental damage. However, enemies starting their turn in the area take damage again. Heightening increases the size beside the damage, which is nice.
Consuming Darkness (rank 5, Sorcerer): Deals less damage than Sepulchral Mask until level 19, and takes an action to sustain it. At least sustaining it increases the size.
Lament (rank 1, Cleric or Champion): Decent damage in a 30 foot cone, but many things are immune to mental damage.
Heal (rank 1, divine, primal): If the enemy is undead (quite rare), and the party is not (very common), it is very party friendly. However, you usually do not get to choose your enemies.
Flame Barrier (rank 4 focus, Cleric or Champion): It can protect one ally somewhat from your fire spell. Divine spells dealing fire damage are quite rare, and this is unlikely to completely eliminate the damage even on a successfull save. Best used on enemy spells.
Undeath's Blessing (rank 1 focus, Sorcerer): The target of this spell is healed by Harm, which is even better than being undamaged by it, but it is unlikely only one of your allies would be in a 30 foot emanation.
Backfire Mantle (rank 3, item): While not a spell, if everyone in your party wears one of these, it is a bit less likely that you hurt them. I would not dare to fling a Fireball into melee even if these improved the save result by one degree.
- of course other alignment combinations work too, but this is the most likely
- if the target fails the initial saving throw