Caulk wont stick to baseboards
If the caulking isn't applying to the paint, you can try scuffing the paint just below the top of where the caulking would affix with 120 grit sand paper. However if the floor is moving it could be pulling the caulking further than it is designed to stretch. For the latter issue, is your goal:

Aesthetic, you prefer to have a seamless transition between the floor and the baseboard

Sealing, you need a water or airtight finish?


For aesthetic reasons like an uneven floor with minimal vertical movement, you can try using quarter-round to follow the contour of the floor. Or remove the baseboard altogether and scribe the bottom of the baseboard to match the contour of the floor, then cut and sand to fit.
For aesthetic reasons like a moving floor that slips horizontally, or a need to have a watertight/airtight seal, remove the baseboard and use clear silicone bead against the wall and floor. Then apply a vinyl/rubber baseboard with some pressure on the bottom lip that will allow for flex. You could also use a rigid baseboard as pictured, that is scribed and cut to shape to match the contour of the floor, then reapplied as the silicone bead is still wet. Silicone has some flex in it and when done &quot;blindly&quot; will tolerate movement better than face sealing.
If the floor is meant to be floating, like many wood laminate snap together floors, and some linoleum floors, you may not be able to use caulking for a seal at all. If water/air tight seal is required, the floorboard may need to be raised slightly and a closed cell foam or rubber strip is used to make the seal, then concealed behind a quarter-round face at the bottom of the baseboard. This is why many commercial baseboard applications are done with vinyl baseboards, which can accomplish a degree of both water tightness and flexibility for floor movement.