The law of a state governs the events happening throughout the jurisdiction of the state - even if it's not invoked the second the event took place. AKA even if you do not throw out the trespassers the second they trespassed, they remain with no property rights. That's law 101.
AKA romulan law applies, klingon law applies, etc.
The romulan/klingon/federation claim is supported by their power and recognised by the other powers in the quadrant. AKA as per the alpha/beta quadrants legal systems, their claim is valid.
Comparing that to the 'moon land' claims of nobodys is yet another straw-men.
The baku were HIDING in the Briar Patch. The situation says so, the movie said so, etc, etc. No adverse possession here. Deal with it.
Trespassers are evicted, not convicted. Trespassing is generally a civil law matter (apart from a few forms which are crimes).
Trespassers are evicted from undeveloped land all the time.
The baku, as per property law, have no legal right whatsoever to the planet.
And helping BILLIONS by evacuating 600 egoist elitists? The federation has the moral right to evict them, no matter how long you'll play 'see no evil, hear no evil, speak no evil'.
The canon facts state the federation kept the Cestus III colony - aka did not recognise the gorn right to it. They also expressly state the planet the baku trespassed on is a federation planet.
That is the federation depicted in these cases - real-politik and all.
You obviously want to turn the federation into a suicidal political entity that follows, with religious fanaticism, a set of rules you call 'moral' but are nothing of the sort (not evicting 600 trespassers to help BILLIONS? Really? To think you actually call that 'moral').
Well, in all fairness, your depiction of the federation is encountered in a few episodes/etc - just not relative to the aspects under discussion here.
You have the right to your opinions, but not to your own facts.
The opinions you repeat and repeat (the baku are not trespassers, etc) are based on nothing but hand-waving and rhetoric; as such, they have no worth.