My theme is full of error messages in the “Customize” screen, but nowhere else

I figured this out while writing the question, but I thought I’d post it anyway since I couldn’t find the answer to this on Google.

It turns out I had deleted a page at some point, but I had a menu item that still pointed to that deleted page. That menu item caused all these errors.

Deleting the invalid menu item fixed the issue.