As a person who is Puertorican and who lived there for 20 years I can tell you, unless etiquette has changed greatly in the 23 years since I left, a number of things.
"Bon apetit" was never used at ANY restaurant, even high-end ones in San Juan. "Buen Provecho" was always used, and almost, indeed, a phrase so "natural" to the customs of everyday language that it is said almost in the most spontaneous way, just as we say "Thank you" (well, those who do).
Indeed, "bon apetit" is almost a literal translation to "Buen provecho", but simply as usage, not exactly word for word. That is inconsequential to the issue at hand, to me.
As to roots and origin, I have no possible help there, never having been concerned with Etymologies. Your best source is to google "Diccionario de Real Academia Espanola" which must have its website and would offer you the entire context.
As of people passing by and telling you "buen Provecho" is something that I cannot recall ever hapenning to me.
It is, one must be BLUNT, a CLASS issue I suppose, and Puertoricans are known, broadly speaking, to be rather "informal" in their approach to strangers. If you look American, then they probably would try even harder to establish contact, since "we" have "worshipped" Americans for more than a century (an exception being the Independence movement). With all respect to you, where you at a rather informal place like, say a "diner-like" restaurant? The higher you go in the socioeconomic strata the less you will see such spontaneity. This, in my experience, is something almost "universal".
If you are "weirded out", as you say, the advice wsould be to simply be polite and offer a "distant" smile. Perhaps a "GRACIAS".
There is, to my knowledge, no "shade of meaning" as you point out rather "mysteriously". Again, it is the equivalent, when it comes to everyday language, to a very common expression like "thank you". No thought is given to it.
As to "bon apetit", you are perhaps aware of how the french phrases that were so much a part of the English language (to basically denote class, sophistication)are dying slowly. Alas, the French are quite disturbed by it. There was a time when even in PR the highest levels of society (in many countries, indeed) people felt they NEEDED to speak at least some broken French. No more. In Manhattan, where I live, it is used less and less, and since there isn't a phrase to connote this, I see an "enjoy!" as the "exit" for the waiter. "Bon apetit", again, is dying a slow death, and it is starting to sound a bit pretentious.