The ballads were printed as verses alone, Matt, with no musical notation. Often, they'd be composed to work with a familiar hymn tune, such as All People That on Earth Do Dwell, and some added a note saying "To to the tune of xxxxxxxxxxxxxx" above their first line.
They're ballads in the literal sense, in that they stick quite closely to that poetic form's rules - alternating three-beat and four-beat lines, for example. With so many well-known ballads already in their heads, most people would have been able to put a new set of these verses to music pretty instinctively. Finally, the sellers would often sing or chant choice verses from the ballads they were trying to sell, so there was a model there too.
There's more on all this in my piece. As you say, there's lots of scope for today's songwriters to revive these songs with tunes of their own devising. In fact, one of the reasons I launched into writing about the old ballads I've collected was to encourage precisely that.