Unfortunately, I agree with both the City of Palm Beach and the homeowners association, at least in part.
I wouldn't want my neighbor just erecting a 50 foot high pole in the grass and tossing a flag on it and saying "done". High wind, rain, or the like and that pole could end up on top of my home. In addition, if you belong to a community with a homeowners association, you should abide by the rules.
Now, my exceptions to this are:
First. if the 50 foot pole on Trumps property falls, what does it damage? Trumps property, that's right. Are they not happy having him and all the other rich neighbors (some of whom live there merely to "live next to Trump) paying taxes on those huge estates? So what's the purpose in the permit? None, in my opinion. However, that is the law. A law which possibly needs to be amended from the sound of things.
Second. Why can't the homeowners association think outside the box here? Ask him to take his down, sure. However, can't they build a single flagpole in the middle of the community? Why not ask him and other veterans to pull "flag duty" and honor not just the Colors but also the traditions of the service and country they love.
Laws are laws but what has made the U.S. what it is today is this ability to adapt and overcome - not cramming legalese down each others throats which now seems to be the norm.