Search engines do not punish you for bad sites linking to you.
The reasons are numerous, but simple: first, web spammers have many sites which they cross-link... and to avoid the appearance of "sites only pointing to bad sites", they make a point to link to many good sites also. But also is the problem of the "Joe Job": a competitor, trying to "take you out of search engines, could pay web spammers to point all their bad sites at you.
As such, no competent search engine would ever punish a site for who links to them. The site has no control over it.
Scammers also copy other web sites
So again, the fact that you have the same text as scammy sites is not, itself, a condemnation of your site.
And better search engines will certainly try to track who created content first, so they will recognize which is the creator and which are the imitators.