Psalm 137 starts (in my own translation)
On Babylon's rivers, there, we sat, also cried, in our remembering Zion.
and continues to describe the scene. Ibn Ezra cites some who hold that David authored the psalm with divine inspiration and was referring to the Babylonian exile, which was more than 400 years after his passing; the (later) M'tzudas David also holds of this view. (An alternative view is cited by ibn Ezra there, but for the purposes of this question assume David wrote it referring to later events.)
My question is how people (average Joes, not, say, David) of David's time and the 400-odd years thereafter understood the psalm. Did they know it referred to an impending Babylonian exile, just not know when it would be? Did they think it was metaphoric, referring to other things entirely? Did they think it was referring to a Babylonian exile, but one which (they thought) had been averted? Did they look at it and not have any idea what it meant? Or what?
A sourced answer would be ideal.