I found a couple of bugs with search terms "pdf text color"
https://bugs.launchpad.net/inkscape/+bug/885244https://bugs.launchpad.net/inkscape/+bug/1671789https://bugs.launchpad.net/inkscape/+bug/1488308As I said before, I probably don't have the right skills to evaluate what's causing this problem. I can't even be sure if those bugs I found are exactly the same problem as yours. However, I can make some observations.
When I open the PDF in Inkscape, using the Internal Import, where the text becomes red, I also notice that the text has become Symbols. I can only guess that something about changing the text to symbols might be part of the problem.
If I choose the Poppler Cairo import, I end up with green text -- not green paths. Oh, but wait. I just realized about this:
When I import the same file in the desktop instance the same happens for the default "Internal import" option, but not for the "Poppler/Cairo import" option. However, since I need small file sizes converting text to lines is not an option.
If you are converting the PDFs to PNGs, the text will not become lines or paths, or any vector element. Once it's converted to the raster format, everything is mapped to the pixels.
So the problem is happening by opening the PDF in Inkscape, using the Internal Import option (or whatever is the equivalent part of your shell/batch/code process (which I don't understand at all)), and not any other part of your process. At first, I thought you were suspicious of the PDF to PNG conversion being the problem. But the problem seems to be PDF to SVG, and only with Internal Import.
I wonder if there would be any way for you to specify that Inkscape uses the PopplerCairo option, via the shell/batch/code process (sorry, I just don't know the proper language). (is it commandline?)