Hi,
there are a lot of encoders. Hollow shaft and not hollow.
One manufacturer with many different types is:
https://www.kuebler.com/usa/index.html
--> With an internet search you will find many other manufacturers.
And you will find any mechanical adaperts to adjust for different shaft diameters.
--> The encoder manufacturers will help you with this.
But you say "shaft speed measurement"...
(you didn´t give any specifcations about RPM range, resolution, precision, measurement interval...thus we need to guess)
I´d say there is no need for a true encoder.
Maybe a simple reflective sensor and some (painted) markings on your coupling device will do the job.
Klaus