Why a PDF page has no resolution until you ask for one
A JPEG knows how big it is. Somewhere in its header sit two numbers, a width and a height in pixels, and every pixel is stored explicitly. A PDF page has neither. What it has is a MediaBox giving its size in points, where a point is exactly 1/72 of an inch by definition, and a content stream of drawing operators: move here, set this font, show this string, fill this path. Nothing in there is a pixel. The page is a set of instructions for producing an image, not an image.
That is why the question "what resolution is this PDF?" has no answer, and why converting one to a picture is a decision rather than a lookup. You are choosing how finely to execute those instructions. At 150 dots per inch an A4 page becomes about 1240 by 1754 pixels; at 300 it becomes 2480 by 3508, four times the pixels and roughly four times the work. The text is drawn from font outlines at whichever size you picked, so it comes out genuinely sharp at both, unlike an upscale of a small render, which cannot invent detail that was never computed.
Rendering itself is done by pdf.js, Mozilla's PDF implementation compiled for the browser, which is the same engine Firefox uses to display PDFs. It runs in a worker thread, which matters more than it sounds: rasterising twenty pages is enough work to freeze a tab, and a frozen tab is indistinguishable from a broken one. The pages come back as canvases, and each is encoded and then explicitly released before the next begins, so a two hundred page document costs one page of memory rather than two hundred.
One detail decides whether the output looks right or looks broken. A PDF page usually declares no background at all, on the reasonable assumption that it will end up on white paper. A canvas starts out transparent, and JPEG has no alpha channel, so transparent pixels are written as black. Convert without painting the canvas white first and every page comes back as white text on a black rectangle. It is a one-line fix and a completely convincing bug, because it looks like a rendering failure rather than a colour-space mistake.
What you lose in the conversion is the thing that made the format worth having. Selectable, searchable, screen-readable text becomes a picture of text, and no amount of resolution brings it back. That is the right trade when something downstream simply will not accept a PDF, and the wrong one otherwise. If the words are what matter, the original file still has them, and OCR can recover them from the picture at some cost in accuracy.