Unfortunately, I do not believe that PUBLISH has the ability to do what you are asking. It expects all of that information to be input ahead of time. Also you cant run scripts as part of the publish process, so there wouldnt be a way to do this in the background.
Perhaps an adjustment to your workflow for future projects may be helpful. When adding your title block, you can set the correct page setup current, then when you run the publish, it will use that specified page setup and eliminate the need for an "addon".
As for your current question, some sort of script that opens all the selected drawings, sets the pagesetup current, then plots and closes would probably serve you best. If you put a save in there, in theory, you could move into just using the last saved page setup, and I would think that it would be much faster to just issue the PUBLISH command than to run the script every time.
What about looking at the title block name itself instead of adding an extra attribute? If you can just look for the block name it would be faster than looking for the block name, then looking through all the attributes until you find the one you need, and hope someone filled it out like they should. Same thing as what Paul suggests, you would also need to assume the page setup existed in the file. In the past, when I've done automating of page sizes, I started my LISP with importing the named pagesetups from our template and overwriting whatever was there. Then chose the page size based on the name of the title block.
Christopher T. Cowgill, P.E.
AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.