Are the mercenaries that can be purchased from the marketplace generally better than the ones hired in-game for free? Even if I ended up with a lower rarity one, is it still worth the money?
I don't know about the marketplace mercs, I never buy them. But it will probably also depend on what level you are playing, and what class. In my opinion, at low levels the free in-game mercs are plenty good.
I've done some of both, they seem to be the same to me. Look at the tags on the brokered ones if you afford some from there. they: the Treasured I think is average and Fabled are a tad better. Free ones work fine, simply train them but yes, higher tiers are better. Purchased ones at treasured level won't be any better then the free ones at the same level.