What would be the best 10 person group for PvE? 2 medics, 5 commandos, 2 officers, 1 spy? I have no idea, im wondering.
What kind of PvE content do you mean, exactly? If you are talking about Heroic Encounters (raids), you can only have up to eight players. As Decilation indicated, standard holy trinity rules apply: main tank, off tank, four dps, and two healers. As far as which classes, generally it's better to have more variety. Part of the rationale is so players aren't all competing for the same loot, but also because redundancies in classes means certain abilities won't stack which can hurt overall group DPS. If you have more than one commando, for example, make sure the weapon they are using has a different element as I don't believe they stack (I might be wrong as it's been six years).
In my opinion, having at least one officer is an absolute must for their AOE burst, their group buffs, and their stims. Spies are great for their DOTs and burst. Commandos are also great for DOTs and insane damage mitigation. DSJ have always been incredibly power (too powerful IMO) and deal massive amounts of burst damage. Bounty Hunters and Smugglers also aren't too shabby, with both classes generating an impressive amount of burst damage. You really can't go wrong with any of the classes, although I think some are more suited for PvP than PvE. As long as the player using the class is competent and has the proper gear, you should be fine.
It's honestly going to be rough for everybody until players start getting their 5-piece jewelry sets. That will be one of the first things I do, beyond just completing the entirety of the Master Jedi Cloaks Collection as fast as possible.