Most easiest way, if you have C++ base class for blueprint is to declare those variables in C++ and make them Blueprint accessible ( UPROPERTY(EditAnywhere,BlueprintReadWrite) first makes varable accessible in property editor, 2nd makes variable settable and gettable in blueprint, it wont be visible on variable list you need to search the nodes you need to search nodes, there also different access modes you can choose). This way variables physically exist in C++ and can be accessed in blueprint and it does not matter if you set them in blueprint.
Without physically declering variable in C++ you need to read and write from uproperty object representing the variable that you can get from UClass of class
Then cast it to proper UProperty type and read out (you can follow API refrence links).
But i really recommend first option, use 2nd only if you don’t have other options