Realizing spin squeezing with Rydberg interactions in a programmable optical clock