How to register global (i.e., unique per file) properties?
Short answer: no, you cannot store per-file custom data.

A .blend file is basically just a collection of ID data blocks. There is no customizable data instance for "the file". All custom data must be associated to one of the ID blocks (or possibly eligible subdata that supports custom props, like bones or nodes).

Depending on what you actually want to do there are a number of other options:


You could make a dummy ID block (e.g. Text) to which you add custom data
Addon preferences can store custom properties for persistent settings of addon scripts
Scene data blocks can be a viable option, they are a sort of "root node" in most cases


It really depends on the actual use case.