Why should a barren woman sing because she did not give birth?
Brachos 10a: She did give birth - "Rabim Benei Shomemah mi'Benei Ve'ulah"! Rather, "Akarah" refers to Keneses Yisrael; she did not give birth to people that will go to Gehinom.
Rashi, based on Targum Yonasan: This refers to Yerushalayim; she did not give birth or have contractions. She sings, for she will have more children than Be'ulah (Edom).
Malbim: The verse depicts the country as a mother who gives birth, and the residents are her children. It depicts Tziyon as a barren woman who dwells desolate, and afterwards many children come from afar - "Mi Yalad Li Es Eleh" (49:21). She will sing, for even though she did not give birth, she will not lack anything. She profited, for before birth, a woman trembles and screams in her contractions. So a country, before its birth (kingship), it has many wars and upheavals. A great awesome nation will come suddenly to Tziyon [like a woman who gave birth] without any contractions.
Who are "Bnei Shomemah"?
Radak: Residents of Yerushalayim. They will be many, even though she was desolate for many years.
Who are "Bnei Be'ulah"?
Rashi: Bnei Edom.
Radak: Nochrim, who are Be'ulos, i.e. a woman who dwells with her husband and children. She will become a widow and bereft of her children. Yerushalayim was "k'Almanah" (Eichah 1:1), but not truly a widow, for her Husband is alive.
Malbim: Residents of another country that had a husband, and she bore children to him.