Você não precisa do segundo ! . Deve ser apenas:
:'<,'>! sort -f | uniq
Em :help :! :
Any '!' in {cmd} is replaced with the previous
external command (see also 'cpoptions'). But not when
there is a backslash before the '!', then that
backslash is removed. Example: ":!ls" followed by
":!echo ! \! \!" executes "echo ls ! \!".
A '|' in {cmd} is passed to the shell, you cannot use
it to append a Vim command. See :bar.
Portanto, !uniq será o último comando executado, com uniq anexado:
:!ls
:!echo !uniq
Saídas:
lsuniq
Press ENTER or type command to continue