I have a setup like attack.h · GitHub. When looking at the defaults for a BP from AMyCharacter in the editor, it only gives my a class selector, and I cant edit the Name or Cooldown variables from the CharacterAttack instance.
Make sure the variables are declared as EditDefaultsOnly in the UPROPERTY macro.
Just try to declare your variable like this
UPROPERTY(EditAnywhere, Category = StaticMesh) class UStaticMesh* TestMesh;
For more detail information about UPROPERTY arguments check out this article Unreal Engine UProperties | Unreal Engine 5.1 Documentation