In theory, this should work because each exhaust fan should be equipped with a one-way flap that prevents air from entering the bathroom through the fan. However, speaking from experience, if I take a shower in one bathroom and have that fan on, the other bathroom seems to experience increased humidity. It's not so much as to cause a problem, so it probably depends on how much use your bathrooms get.
Also, when you have the fan on in one bathroom, you can hear it very clearly in the other!
I have a contractor coming to do work in one of my bathrooms, and while he did not give a detailed explanation why, he strongly recommended using a through-roof vent for each fan. He will be vaulting the ceiling, so I will likely have him install two through-roof vents, 1 for each fan!