If one of the Pokemon switches out, it wears off for that specific one
So let's say Alakazam uses Guard Split on a Shuckle. If Shuckle switches out, it gets its normal defenses back. If Alakazam switches out, it goes back out its normal defenses.
EDIT: Just saw Pain Split. All HP based moves stay in effect even after a switch unless the target has Regenerator.
Source: experience
Hope this helps!