Can PDFs with different page sizes be merged?
Yes, and the result is a perfectly ordinary PDF. The expectation that everything must match comes from paper, not from the format.
Page size is a property of the page
In a PDF, dimensions are not a document setting. Each page carries its own box — its width, its height and its rotation. The document is a list of pages, and nothing in that list requires them to agree.
So a single valid PDF can hold an A4 report, a US Letter invoice scanned abroad, a landscape spreadsheet and a square photo page. Readers handle this without complaint: they fit each page to the window as it comes.
Why a merge does not need to normalise anything
Because the sizes live on the pages, copying pages into a new document carries their sizes along. There is no common format to convert to and no decision for the tool to make.
Forcing one would be the destructive option. Scaling a landscape spreadsheet down to fit a portrait page shrinks its text; padding a Letter page out to A4 adds margin that was never in the document. Both change what the page looks like in order to satisfy a tidiness the format never asked for.
When you might still want them to match
There is one honest reason to care: printing. A printer tray holds one paper size, and a mixed document either gets scaled by the print dialogue or comes out on whatever is loaded.
That is a printing decision, and it belongs at printing time — in the print dialogue’s own scaling options — rather than baked irreversibly into the file. A document that is only ever read on screen loses nothing by being mixed.
What does carry across
Along with size, each page keeps its rotation. A page that was landscape because it was rotated stays that way in the result, and turning it later is still a change to that page alone. See reordering pages before merging for doing that in the same pass.
Doing it in Merge PDF
Add PDFs of any sizes. The page grid shows each page at its own proportions, so a landscape sheet is visibly landscape before you save. Merge PDF writes one document in which every page keeps the size and rotation it arrived with — nothing is resized to match. See whether merging costs quality for the related question.
Merge your PDFs in the browser → Merge PDF