The planting of the tree is completed. It was planted at some time in the past, and that planting is now done. So a present perfect is inappropriate.
If the tree is still there, you could use a present perfect to describe its presence. Like, "This tree has been in our city for over four hundred years."
Or if there was an on-going process of planting trees, you could use a present perfect to describe it. "We have been planting trees in this city for over four hundred years."
Update
It occurs to me that the issue here is that apparently at some point you read or were told that you cannot use a simple past tense with an "unspecified time", which you are taking to mean a time that is not precisely identified. There is no such rule in English. Perhaps there is some valid rule that you are misunderstanding and I'm not seeing what you're referring to, but the rule as you are stating it does not exist. It is perfectly valid to use a simple past tense with a very vague time.
On June 13, 1968, I visited Boston.
I forget when, but it was a long time ago, maybe when I was around ten years old, I visited Boston.
In both cases we use the simple past. The fact that in the second example I am very vague about the exact date has nothing to do with it. The action occurred in the past and it was completed in the past, so it's a simple past tense.