I wouldn't necessarily worry about this much. There is not, as such, an extra blank line at the end; rather it is conventional that a text file should end with a newline character. That is, conventionally every single line in a text file ends with a newline character, meaning the only text file that doesn't end with a newline is the empty file. You can see this in tools like diff, which explicitly report "no newline at end of file" if the file ends with a different character.
If you were to save the value to a file you would probably want it the way it is.
That being said, this is a database column result and I agree it would look more elegant if the blank line in the display were not there. I might go so far as to change the psql display routines to not leave a blank line after the content in the event it ends with a newline.
psql shows to display content without changes. I don't think it should be fixed on the client side.
But it can be easily fixed on the server side. I think there is some code that tries to clean the end lines already.