Hmm, it could go either way. Since Medford and Somerville border each other, you could very well live in Medford but still be walking distance to Davis Square in Somerville. S'ville is much easier to navigate without a car (unless you live in the part of Medford that borders S'ville), so that would probably be better for your commute to school.
As far as the Woburn commute, it depends. Parts of Medford are right off the highway, but parts are further away. The same is true of Somerville.

Either way, you're probably looking at driving to work in Woburn, unless there's a bus that happens to run to where your boyfriend works.
Walking the dogs will probably be fine in either place, provided you choose a nice neighborhood. There are parts of Somerville I might feel slightly uncomfortable in alone at night, but most I'd have no problem with.
I live in Medford and love that I can be anywhere (downtown, Cambridge, Burlington, etc.) in about 10 minutes by car. I have a dog that I walk alone and take to dog parks. But I would opt for Somerville over Medford if I wanted to be able to go car-free, and choose a neighborhood within walking distance to Davis Square for easy T access.
Good luck!