What this is supposed to mean is that the fates of all the people in a society are intertwined.
When he said this he was referring to the idea, in Third World countries, that the rich few could just go along happily oppressing the many who are poor. The quote means that if the many who are poor are not helped, the rich few will eventually regret it.
So to put it another way, Kennedy is saying that if your society ignores the poor, they will rise up and bad things will happen to the few who are rich.
In this quote from his inaugural address, he is saying that we will try our best to help the many who are poor in these countries so they will not rise up and destroy the whole country.
At the risk of overstating the case, this is a form of propaganda. Kennedy was stating a position that is noble and which sounds good, but which is probably unmanageable. It is important that society find a way to help the poor, if only because it is necessary to have a strong middle class (created through helping the poor --- or which is at least an option held out to the poor) to protect the whole free society; people need to have the hope that they can move up to keep the society stable.
The problem I see with Kennedy's statement, which is clearly an idealistic position, is that I don't know what the "save the rich" means ... unless it refers to maintaining the hope of the poor to keep them from rebelling against the rich. But it seems unlikely that this revolution could happen in our country. And how much can we take from the rich before they're not rich any more? We are presently taxing the rich (which, by the way does NOT include me :)) ... is it possible to tax them so much that there's no more to take? Then what? And, of course, where does the right to tax people like this come from? Just as the poor need the middle class to aspire to, so the middle class needs the rich to aspire to.
I guess your reaction to Kennedy's statement depends in part on whether your favor a socialist or a free market system ... or a blend of the two --- which I think the US is now. The question is how much of which viewpoint goes into the blend?
I do not really know in what context Kennedy spoke the words ascribed to him above. But It will be reasonable to assume that these words are more to produce some specific feeling among the listeners and shape their conduct. It looks like this statement must have been intended to generate among the listeners the feeling that in a nation or a society both rich and poor exist together harmoniously, but for this to happen the people who are better off economically must care for the welfare and needs of the poor people. A statement like this also tries to reassure the poor that existence of rich in the society is not necessarily against the interest of the poor.
Such feeling are very much in line with modern business thinking, particularly the modern marketing philosophy, which hold that a company can make profit and continue to grow, only by delivering to customers more value than the prices it charges. As per this business and marketing philosophy the rich can become rich only by serving their customers- which include the poor - better and giving them more than what they take away from them, and not by robbing them of what they have.
To me it appears very unlikely that Kennedy, as implied in the answer above by Pohnpei, was referring to the conditions in the third world countries, or that he was expressing his intention to help the poor in those countries. The statement of Kennedy, as quoted above clearly refers to need for action by people within a society, and not to some outside country intervention. It is more likely, that the statement was intended to support the capitalistic system in America, against the socialistic system, against which America felt very much threatened at that time, and spent considerable resources to counter it in form of the cold war.
Here is more of the quote:
"To those people in the huts and villages of half the globe struggling to break the bonds of mass misery, we pledge our best efforts to help them help themselves, for whatever period is required -- not because the Communists may be doing it, not because we seek their votes, but because it is right. If a free society cannot help the many who are poor, it cannot save the few who are rich."
Communist was a powerful word back then. Then he says "free society". Perhaps he meant that if America can't do the moral thing and help the poor, then we have no moral authority to save the countries (the rich who run them) from turning to communism.