If you want to access the stuff created in blueprint from C++, then C++ doesn’t know much about the blueprints you create, to access the variables you would have to go through property link, which would be nasty in normal, non specific usage.
I recommend making a MyAnimInstance class in code that derives from AnimInstance and then create your blueprint based on that. This way you can make virtual functions that can be implemented in blueprints/code or variables that can be set in blueprint/code and you will be able to access them from both code/blueprint (editor).