Answer
Try deleting and recreating that specific reference attribute rather than troubleshooting the underlying compile error directly — in one confirmed case, this resolved a publish-time compilation error on a reference attribute with no other clear explanation for what was wrong; notably, creating a brand-new entity with an equivalent reference attribute from scratch didn't reproduce the same error, suggesting it was tied to some stale state on that specific attribute definition rather than a fundamental problem with reference attributes generally.