I'll start here:
He ducked behind a tree before he could be spotted.
To me, this version clearly indicates that he was not spotted.
I disagree with user1369's comment that "could" adds nothing, and I do not find this version of the sentence ambiguous at all.
No native speaker is going to hear a sentence like that and think it means "He ducked behind a tree before the mere possibility that he could be spotted even arose." If that was the intended meaning, we could be talking about some random time he ducked behind a tree ten years ago, which would be entirely irrelevant and make no sense to introduce into the story at this point.
We have to assume there is some relevance to "before he could be spotted," and as such, we have to assume that the phrase means he wasn't spotted.
As for the original sentence:
He ducked behind a tree before being spotted.
My initial instinct was that he was spotted, but the more times I read it, the more I am unsure. So I will simply concur with Robusto that it's ambiguous.