Original poster here.
I get this problem also when I compile for Print and choose PDF to display the book, rather than print out the pages. Also, when compile straight to PDF.
As suggested above, compiling to Word works fine. And again we are talking about a manuscript that I’ve been compiling to PDF for 13 years, including the current last chapter, with no hiccups.
I do use a custom format, the product of much trial and error once Scrivener went from the earlier version to version 3. The learning curve with Scrivener – both the old version and the current one – is steep. Certainly not intuitive.
But once I found where the things I need are, hidden around the Project settings, the custom format and its options, and the setting tab on the compile page (that obscure, hard to find the first time, gear wheel tab), I understand the logic of the compile.
My custom format has not changed in years. It is only in the last month that PDF compiles left out the last pages.
I switched the last two chapters around as suggested. The same problem occurred (see above for details). So there’s nothing corrupt or odd about the last chapter. Nor does it have images or any bells and whistles. Just plain text laid out in paragraphs, distributed over several “scenes” (that is, separate text files within a folder that prints only the chapter name.)
I am working on a new book, with its own format, copied exactly from the one that skips the last page, and this new copy of the format compiles to PDF fine… the way the original did for ten years.
I am surprised – and disappointed in Scrivener – that this is a problem people have had for a while now, many people, not just me. And there has been no fix. Other apps – Word, Affinity Publisher, Preview (a Mac image app) – compile to PDF as expected.