I'd second Robs suggestion. The rename command is almost certainly the best option here.
If you know what you're looking for in each file - it should be fairly simple to write a script to find the field in each pdf file and then rename it using the rename command.
And you have an extremely large number of files to rename. So you might want also want to consider using something like GNU parallel to speed up the process by multi-threading it.
If you use parallel - the more processor cores/threads you have available - the faster your script will complete.
But Parallel does have a bit of a learning curve. So it's a case of weighing up the time-cost of learning GNU parallel and writing a script that can leverage it's power - against the time taken to write a simpler, non-multi-threaded script and the time it will take to execute!