So in other words, the string constant is a “special case” in the world of pointers
No, not at all. The rule is that if you allocate it, you free it. The compiler allocates it, so the compiler frees it. There's no special case involved.
So if I call the display function inside another function, the data/content will still be handled properly on exit?
You have to call the display function inside another function because it's not a part of any static object initialization. Regular functions can't be called at the global scope. But yeah, it'll still work the way you want.