Your main problem is that PDF files do not store contents in plain text. Your script should work for .TXT files.
For PDF files you will need to use something that can "read" the PDF contents.
https://superuser.com/questions/1278479/search-pdf-contents-with-powershell-and-output-a-file-list