This issue seems to be coming from the maven-scr-plugin. By moving to Java 11, the class files that you create will be compiled to Java 11 byte code. The maven-scr-plugin then has to scan this byte code to find the annotations that are applied to it. You may need to find the maven-scr-plugin that supports Java 11.
I found a few relevant links that contain the hotfixes/workarounds and could be helpful:
Could you please verify whether the source and the target compilers are using jdk11 or auto setting, in your IDE and also that the machine shows the latest version of Java (11) as installed by checking the java version on it?
In AEM, you can check & set the compilers by following the below steps:
In http://<host>:<port>/system/console/configMgr, open Apache Sling Java Script Handler, and set Source & Target VMs to auto or to some jdk 11 version.