We can't be certain of the author's intent when he wrote the above quotation. He could have intended to convey a somber mood; he could have meant to be sarcastic; or perhaps he wanted the statement to be humorous. We can never know for sure.
When I first read the above quotation, here's how my thinking went:
First, he refers to the unknown THEY. Growing up, I often heard statements about they did so and so, or they went here and there, or they spent their money on this and that. When I was old enough or brave enough to challenge, I'd ask who they were. No one could or would ever identify they.
Allow me to substitute some words into the quotation above and let it be thus: "The past is a foreign country; I would do things differently there."
Therefore, concerning those things in the past that we now know didn't turn out so well, in hindsight we would of course do things differently in order to have a better ending. Of course we would, no doubt about it.
But that will never be. No, the only good I see from hindsight is to use the experience of it and apply it to situations in the present. That would help us to prevent missteps and bad judgments so we won't repeatedly make the same mistakes and reap the same consequences.