Welcome to Inkscape Community!
It sounds like you're using the command line, and I'm not very familiar with that. The Inkscape Text tool doesn't provide for underlines (although it seems like I've seen that will be available in the next few new versions). So if you want to have underlined text, you have to actually draw them yourself, using Pen or Pencil tool.
But somehow, it looks like you've been able to make underlines! Did you paste the text in, which was created somewhere else? Or did you use the command line to create it?
When I use File menu > Export PNG, it exports the underline. So I'm not sure if it's a deficiency with the command line? Although, I did edit the file a bit, before I made that export. Let me try without changing anything.... Hm, no, the underlines came through perfectly!
Let me ask, do you know if the command you used accesses the same function that Export PNG provides? It must be somehow different. Would you be able to use the Export PNG dialog, rather than the command?
Edit
Or maybe it's something about what you're viewing the PNG with? Because look at the attachment below. It shows the underline. But if you click on it, which will bring it up to full size (in a new window), the underline isn't showing!