Well - there’s two parts here - Command XP or Character XP? And then there’s also the fun factor that we should never forget.
With Command XP, you will get the most experience for completing the most difficult PvE you can, as fast as you can, where you can reliably win most of the time and get credit for a fair share of kills, platforms, and other achievement-incrementing actions. Simple. Because whatever difference there might be, getting faster 500xp achievements is going to blow all other options out of the water - two of those is a command rank right there. I think for most people this is going to be 5-manning normal PvE with a character that will get a fair share or more of the kills. In normal, you’ll almost never fail (for most semi-experienced folk), and you’ll be killing things and progressing on achievements as fast as possible. If you have a pre-made group that can roflstomp advanced in 30 mins, go for it. If you can headshot-spree with Marquis by yourself, go for it. those might be slightly faster if you can negate the added risk.
With Character XP or Command XP while playing a healer/support role, though, I think it’s still PvE Normal, but its probably close enough to not matter. At the least, there are 25xp challenges that everyone will get credit for, no matter what role they play, that aren’t present in PvP. And of course no one wins 100% of PvP matches. No one.
All of that said, I would recommend that you just play. I’ve done the solo grind on some of the more onerous lore challenges that I’d never complete otherwise, but beyond that, I don’t WANT to play in some restricted, most-efficient way all the time, for two reasons - first, it’s not as much fun as just playing, and second, once every character is 15, you’ll likely get bored very quickly.
Edit - I hadn’t thought about bot-match capture as was posted above. This seems a boring stupid grind to me, and I’d never do it, but I admit it could be the fastest possible (though I haven’t tested it - I thought that exp was mostly rewarded by time played, not wins, in which case beating games in 5 minutes doesn’t much matter, but I could be wrong)