Yes, your whole party will gain EVs. However, if a Pokémon in your party is fainted, it won't gain any EVs.
Source: https://gaming.stackexchange.com/questions/360375/how-can-i-ev-train-in-pokemon-sword-and-shield#:~:text=Whichever Pokemon participated in the battle and gained,noticeably gain more EXP than the "bench warmers".
Now, your question asked about how EVs are given. You know about Wild Pokémon giving EVs, so I will skip that part.
Vitamins are items that increase a Pokémon's EVs in a certain stat by 10 up to the max of 252 in a stat. These cost a lot of money, but can be worth it. These increase each Stat.
HP Up - HP.
Calcium- Special Attack
Zinc- Special Defense
The next way is called Seminars. These are a lot like Isle Evelup in how it is a passive way to train EVs. You can choose how long to send your Pokémon for. Here is a chart though to show how long for a certain number of EVs.
A little while- 1 Hour- 4 EVs.
Very Short- 2 Hours- 8 EVs.
Short- 3 Hours- 12 EVs.
Long- 4 Hours- 16 EVs.
Very Long - 8 Hours- 32 EVs.
Half Day- 12 Hours- 48 EVs.
Whole Day - 24 Hours - 96 EVs.
Now, I believe that this is actually the least efficient of the 3 ways I have shown to EV train. However, if you don't have the patience to Money Farm or Battle, this is the way you should do.
These are just like Vitamins except they only provide 1 EV in a certain Stat.
Health Feather - HP
Muscle Feather- Attack
Resist Feather- Defense
Genius Feather - Special Attack
Clever Feather - Special Defense
Swift Feather- Speed.
Use this guide for EVs- https://pokemondb.net/ev
This for IVs- https://pokemondb.net/mechanics/hidden
Sorry for going more in depth, but you asked about how they were given, so I covered some more ways.
TL;DR- Your Pokémon will gain the EVs unless they are fainted.
Hope this helps!