One of many legacy RTF reports changed to PDF would crash Access when run as a scheduled task but ran OK in developer mode (O365 16.0.14931.20604). I have a work-around, so this post is for others who may have the same issue. The report had a sub-report and crashing stopped when this was deleted. The report printed one page OK and failed on the first line of next page. It was not data related as I doubled the detail line row height and it was always the second page. I tried deleting the page heading; simplifying the query and copying to another DB without impacting the error - it always runs OK when started with shift key. To test, the report was run with a batch file (I am old and don't talk PowerShell) and it would run OK if the .bat was opened with shift key and Autoexec run.
By chance I executed the report twice and it worked OK the second time. My work-around (not elegant but enough time has been wasted) is to run a single page PDF report with one line of text "this is a dummy report" before running this report and it works every time.