Update:
I don’t know why, since it didn’t seem to matter last time, but changing the ruleset for which templates are associated with the custom field (changing from AND to OR) seems to have removed the custom field from being associated with the media library.
The question, I guess, is why.