^~ tells nginx that if this prefix is the longest match, use it without evaluating any regex locations. It does the opposite of preferring regex; case-insensitivity comes from ~* on regex locations, not ^~; and internal-only access is the internal directive, unrelated to ^~.
Official docs