It's a bit complicated. And even though you can say that the basic use of the past perfect is to indicate an event that happened before another event in the past, it's not quite right to say that it's the only use.
Before touching that main point, let's take a look at your example sentence first.
In a general context, this sentence is more appropriate:
This tree was planted by the settlers who founded our city over four hundred years ago.
Was is in the past tense; founded is in the past tense. The past perfect is not needed because in this narrative, which is in the past tense, there is no need to indicate that the tree was planted before another event. However, context is king, and it can change everything. Consider:
Here is the town's monument. Besides the monument is an important tree. The monument was built in 1821. The tree had been planted by the settlers who founded our city over four hundred years ago.
Now we have a good reason to use the past perfect--to indicate that the tree was planted before the monument was built--i.e., it was planted before 1821 (it's unclear in what year it was planted, but it must have been at some point between over 400 years ago and 1821).
Back to your main point: is this (the past before past) the only use of the present perfect?
A straight answer is no.
Even though I don't have a complete list, and even though I don't want to touch more advanced subjects such as backshifting and narrative tenses (which don't imply time, strictly speaking; for example, a futuristic novel could be written entirely in past tenses), I can think of one good example: counterfactual conditional.
Here is an example sentence (taken from the Wikipedia page above):
If I had eaten more at breakfast, I would not have been hungry at 11am.
Though it's somewhat related to the idea of "an event that happened before another event in the past", it's not really the case, because in this case, it's "an even that hadn't happened before another event in the past". In other words, I didn't eat enough breakfast, so I was hungry at 11am.
Another point I'd like to make to wrap up this answer is, try to be flexible when learning English, think of those rules as guidelines rather than something set in stone, try to observe how people use these grammatical constructions in real life, and you'll be just fine. Happy learning! ;-)