Let's make it everyone on Earth - except for you - could I personally justify taking it? Of course.
Would it be legal?
Given the numbers involve that wouldn't matter.
I think you answered your own question--if your life is on the line, who cares if it's legal?
So...it's okay to be unethical as long as you try being ethical first?
How is it unethical if billions of lives were on the line, and this was a viable solution, withheld because of a tree (or in Insurrection's case, people just don't want to move?
As I said, how bad a state Earth is really in isn't made clear in the film. Characters make allusions to it, but there's no indication, for instance, that the wealthy and powerful have already abandoned the planet. Without having a better understanding of how bad things actually are, it's hard to weigh in on how justified the humans' evident desperation is.
We know that on Earth, there is a severe energy crisis due to natural resources being depleted. That would certainly indicate a bad quality of life for Earth's people. Imagine the chaos that would exist if we even had to give up electricity. Heating, cooling, hunger, medicine--all of that would be dramatically impacted. And this is a solution that would revitalize the planet.
I don't believe there's any indication in INS that anyone made any attempt to work with the Baku. The only plan the Federation appear to have been involved with appears to be moving the Baku to the holoship without their knowledge. Not exactly ethical. I'm not sure we can blame the Baku for being a bit obstinate when it's revealed that the people who suddenly want their help started out with deceit.
Definitely not ethical, though didn't they try to get them to move by other means? Given the benefits to trillions and trillions of people, the idea that 600 people could get in the way of that is ridiculous if you think about it, and at that point, it is justifiable.
What if you believed your God lived in that tree?
Or, to put this in more Trekkian terms, if it was discovered that the existence of the Bajoran wormhole was harming the Cardassians (handwavium radiation, subspace isoprotons, etc.), do we think the Bajorans would let the Cardassians destroy the wormhole? Would the Cardassians be justified in destroying it with or without the Bajorans' assistance? How would the Federation weigh in on this?
I think this is a significantly different fact pattern, because there are beings in the wormhole.
Cardassians also occupied Bajor. So why don't we make it a little different.
There are no living beings in the wormhole as a matter of fact. But the Bajorans do believe they are there despite the reality that no, there is nothing there.
The Cardassians are not occupiers. They live on a nearby planet, and there is radiation suddenly emanating from the wormhole that will harm all Cardassians.
The Cardassians would have every right to act in the name of self preservation.