How can I prevent a bathroom fan from vibrating?
Fan vibration is mostly a matter of fan quality (which unfortunately is not as simple as price, though it's sometimes related.) Bearings and how well the fan blades are balanced are the main influences.

You can also switch to an inline duct fan located away from the bathroom - any vibration would be non-local to the bathroom, at least, and as a general (but not utterly definite) rule an inline fan may be of better quality than most ceiling-type fans.