I read a book when I was maybe in sixth grade where the group of friends live in the future or something and there are these flying metal spheres chasing them on the cover, I think. The school bully goes back in time with them or something and he ends up getting stuck there and when they return they deduce that he went on to become Leonardo DaVinci because of his knowledge of the future. I cannot think of this book.
There are enough differences in detail that I don’t think this is likely it, but the da Vinci portion sends me toward Diana Wynne Jones’ A Tale of Time City
It’s small point late in the book, but it is in there.