Say, two hundred or three hundred years from now, if we've managed to colonise Mars or the Moon and have huge human settlements on other worlds
There's really no "we" here. Given that a tiny fraction of humanity owns most of the world's wealth, it's a fairly trivial point to understand that they, and only they, will be the ones to benefit from any space travel/exploration/colonization, especially since they will be the only ones who would be capable of funding it.
Would colonial societies on other planets retain their national identity and form boundaries and borders?
I would imagine their identities and cultures would shift somewhat over time, yes.
What I have wondered about is what would, say, a Mars colony's economy be like? Would they run on the dollar? There would need to be some type of resources to collect and export, but there's no telling if these would be worth sending to earth for trade. If not, I'm not sure it would matter if they were on the dollar.
In any case, the by then trillionaires would call all the shots as to the nature of the resource gathering. There would need to be low level workers to do all the work, of course. They would do all the resource gathering and ultimately be exploited by the trillionaires who would pay them as little as possible. Personal responsibility, you know. Should have gotten your space education and worked harder!