This sounds relatively easy - and I can see I will be spending a lot of time on my knees filling all the old and new holes. I will replace any molding that is in bad shape, but this is almost the whole basement, and about half the door molding as well as well as all the base molding (and I am now on pension so pinching pennies even harder) so reuse will be the main activity. I have the paint, I think I have wood putty somewhere, so I guess I know what I will be doing for my Labour Day weekend - hard labour ;)
Just hammer them back out. Get two wood blocks, set them under the baseboard on each side of the nail, hammer it back through, pull out, repeat. When you reattach the baseboard later, you'll have to set, putty and paint the new nail holes anyway; this just gives you a few more (or you can reuse the holes, if you like.)
This may be slightly anti-Mustachian, but you could just buy and cut some new baseboard. It's only a few dollars per piece. That's predicated on having a miter saw and possibly a coping saw, of course.