WinSCP does not support text search in its main GUI.
But there is a built-in extension for recursively searching for text in a remote directory .
This is a universal solution that works with SFTP, even if the server does not allow access to the shell or even for FTP or WebDAV sessions.

Alternatively, you can use the WinSCP console window (Commands> Open Terminal) to start a search from the command line.
grep -r "text_to_search_for" *
source share