Surprisingly, Firefox's PDF viewer does not have a native option to invert colors in PDF. Presently no extension exists which can do this job. Dark Reader does not work with PDF's. At around 8'O clock today, I decided to fix the problem once and for all with a simple Firefox extension.
After hunting on the web for about 30 minutes, I found this thread on Bugzilla. It turns out starting with Firefox 60, extensions are no longer allowed to interact with the native pdf viewer. Determined, I decided to locally modify the CSS rendered by Firefox's PDF viewer. The steps for the same are:
(Following is a fix I created by mixing Superuser - How can I override the CSS of a site in Firefox with userContent.css? with Reddit - Dark PDF Preview)
#viewerContainer > #viewer > .page > .canvasWrapper > canvas { filter: grayscale(100%); filter: invert(100%); }
Screenshot of Firefox rendering a PDF with dark background
Update (26/05/2020): As of Firefox 77.0b9, if you enable spreads (for side-by-side viewing), the style is not being rendered. However, changing the above selector path to #viewerContainer > #viewer .page > .canvasWrapper > canvas { fixes the issue. Specifically for spreads, the selector path has changed to #viewerContainer > #viewer > div.spread > .page > .canvasWrapper > canvas {. Thanks to the reddit user /u/BotOfWar for pointing out this change and it's fix. If you find any further issues/updates here is the reddit thread of this blogpost (archive.org).