You might be able to use a solid coupling if you don't over-constrain the motor. A lot of motors have a C-face with a boss to fit into a precisely made opening in a support bracket. However, this might be worse than a very generous sized opening if the bracket is sloppily attached off of the true ballscrew centerline.
What you want to do is make a solid coupling with an extremely good fit on both shafts. This way, you do not introduce angularity between the two shafts. Both diameters at each end of the coupling must be perfectly aligned, and this means bored in one setup in the lathe.
Then, install the coupling on the ballscrew and the motor. Heat expansion of the coupling may help get a close fit to actually go together without excessive force (like hammering the hell out of something).
Leave the mounting bolts in the flange of the motor slightly loose. Run the motor. See if it vibrates during operation. This can be checked with a dial indicator on the motor housing. If there is any oscillation of the motor, remember when you tighten the bolts up, that the bearing in the motor is going to have to absorb the force locked in by the misalignment. It may fail prematurely if the runout is excessive.
It would actually be better to remove the front bearing from the motor housing and let the ballscrew bearings guide that end of the rotor than to have 3 bearings running close to one another in poor alignment.
First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)