In most of the traditional songs that I know, an unwanted pregnancy is dealt with by killing the pregnant mother, or by post-natal killing of the child. Some other examples of this (in addition to the ones listed above) are:
The Green Willow Tree - English song in which a woman follows her lover to sea, bears baby on board ship and both are thrown overboard by said lover
Banks of the Ohio - American murder ballad where pregnancy usually isn't specifically mentioned as the reason for the girl's murder by her "true" love
Banks of Red Roses - Irish song with same plot as "Banks of the Ohio".
Cousin Joe - grim little English song, recorded by Nic Jones, where young woman deserts her lover to have a fling with Cousin Joe, gets pregnant, attempts to file a paternity suit against original boyfriend, and hangs herself when she loses the suit and can't support the child
Sheath and Knife, Queen Jane - two English ballads about incest, in which the brother kills the pregnant sister to prevent the shame becoming public.
The Month of January, Mary On the Wild Moor - two songs (both Irish?) in which the father casts the pregnant daughter out from the home. In "January", she is singing sadly about her plight; in "Mary", she and the baby die at the barred door of the family home.
The Maid Ga'ed Tae the Mill - Scottish bawdy song about young woman indulging in a fling with the miller and its consequences. Contains verses about the parents' reaction to her baby - one tells her to "cast it out" and the other to raise it in joy.
Underneath Her Apron - English song, again mildly comic, about a very young girl concealing her pregnancy from her family, which is very surprised when the child is born.
All these are traditional. One recently written funny song about birth control is "Bridget and the Pill", where the good Irish Catholic girl Bridget goes up the church hierarchy all the way to the Pope, seeking permission to stop having babies, and finally tells the Church to bugger off and gets herself a prescription.
Some of these are probably in the Digital Tradition database in one form or another; if there's any here you're interested in that you can't find, I'll dig up the words or give you a source.