Hey there! Sounds like you’ve downloaded some adware, (unintentionally of course), that shouldn’t be a problem to remove.
Of course Safari is Apple’s browser, and for that browser, we might have some more suggestions.
However, one place to look is System Preferences, do you see a category there called “Profiles”? If so, and you see something there you didn’t install yourself, I’d remove them by highlighting and pressing the “-“ sign below them,
Then, I’d check System Preferences > Users and Groups > Login Items, if you see anything unrecognized in the space below, remove them using the same process,
Also in Finder > Applications, I’d remove any suspicious apps you didn’t download yourself and aren’t a part of the Mac OS,
Then restart your Mac, that should do it!
If not:
In Chrome > Preferences > Extensions, do you see anything there not normal? I know you said you’ve already remove the search engines and deleted/reinstalled but that still might be the case. If not:
Id download Malware Bytes for Mac to do a scan, they’re usually pretty good at finding known malware if Mac OS hadn’t removed it after restarting.
Worst comes to worst, contact Google. I HAVE seen malware, once fixed on the Mac, still continue to affect ONLY Chrome, with no trace of it on the Mac anywhere, and I believe it has to do with the Malware programmers changing Chrome’s settings on a server level, tweaking the privacy settings to their liking.
Thats is pretty rare though, just let us know if you have any questions, happy to help out!