The answer is yes, the medicine cabinet and shelves affect the load bearing of the house if they require changing the wall studs in a load bearing wall.
The simplest answer is the brief answer. Structural walls on two story homes are commonly the center wall running parallel with the length of the house. Any wall (on all floors) directly above or parallel to a basement beam (wood or steel beam) must be considered by a layman as directly load bearing. Other walls may also be load bearing and require on-site assessment by a professional.
I suggest you consider every wall as load bearing, over build the openings with headers as if they were a door or window …. and be safe. Here are more details about identifying load bearing walls.
Mosby Building Arts provides a consultation service wherein we can assess the load-bearing walls in your house and help you map out the best way to proceed with your bathroom remodel. Call the office at 314.909.1800 or contact us here.