I believe text components need initialization so if you use “CreateDefaultSubObject” function then it should work, but it can be used only inside constructor function, with FObjectInitializer object.
For anyone else who happens upon this answer. Here is how to attach Text in the constructor to a specific socket on a static mesh:
UTextRenderComponent* _text; // define this in your .h file
// in your object constructor create the text object
_text = CreateDefaultSubobject<UTextRenderComponent>("TextComponent");
_text->SetTextRenderColor(FColor::Green);
_text->SetText("Some Text");
_text->AttachTo(_rootComponent, "SocketName");