The exact same thing happened to me just now. The other day I created a new document in AP 1.8.6 on Catalina 10.5.7, and exported it without issues.
Today I opened a document created in an earlier version, 1.8.x, and met the "An error occurred when exporting ..." message. Tried all possible PDF export settings and made sure that all photos were the same profile/ICC as the document settings (Adobe RGB), and checked that no fonts were reported missing in Fonts Manager. The document is a modest 32 page A5 with nine pictures in it. When exported in the previous version of AP, the one it was created with, the PDF export went without problems.
Scratching my head, hoping for a solution ...