I got the units squared up, but it might be hard to explain how I did it. Here goes.
First I loosened all the bolts and the set screws except for on the gear/pulley.
I removed the bolts from one side plate (we'll call it the top side).
The top plate was lifted off and the gear and shaft were removed as a unit.
Then I removed the bolt and long nut (that goes between plates) from two opposite corners of the lower plate. I drilled these 2 holes with a 3/8 drill bit. They are already 3/8, I was just cleaning out the holes as they were a little snug with paint. I also did the corresponding holes in the top plate.
I kind of just eyeballed the bearing on the lower plate to be centered on the hole and tightened the bolts. Doesn't need to be perfect, but I got it as close as I could anyway.
I then put (3) 3/8-16 nuts around the hole and set the gear (with shaft through the bearing where it's supposed to be) on top of them. (there are two of them circled in green)
The top plate was lowered over the shaft and two 3/8-16 bolts that were 2" long were placed in the previously drilled holes. (blue circle shows one of these) These bolts ARE NOT tightened. I'm just using them to align the upper and lower plates.
Now, all you have to do, is tap the shaft around until the pulley/gear is touching all the nuts. Then (gently without disturbing things) tighten the bearing bolts on the upper plate. Carefully slide the nuts out and then gently gently gently replace the 3/8-16 bolts with the long nuts and the proper bolts. If you do it correctly the angle of the bearings shouldn't be disturbed and everything will be nearly perfectly aligned. Tighten the bolts that hold the plates together. Then the shaft / pulley can be centered to clear the nuts on the bearing bolts and the set screws tightened.
This would be a perfect time to realize that you forgot to put the belt on, and start over again. I did it a couple of times.