I was able to accomplish this by using the following code inside the constructor of an Actor class (i.e. ACube):
// Create a static mesh component
UStaticMeshComponent* cubeMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Cube"));
// Load the Cube mesh
UStaticMesh* cubeMesh = ConstructorHelpers::FObjectFinder<UStaticMesh>(TEXT("StaticMesh'/Engine/BasicShapes/Cube.Cube'")).Object;
// Set the component's mesh
cubeMeshComponent->SetStaticMesh(cubeMesh);
// Set as root component
RootComponent = cubeMeshComponent;
Once you have the mesh component, you can use SetWorldScale3D to reshape it if you want something other than a perfect cube.