Do I have to wait days for my library to upload again after accidentally logging out of iTunes?

It all depends on what service you have, be it iTunes Match or Apple Music. This looks more like you have iTunes Match therefore all of you music is accessible from any device. This would mean that Apple matches what's in your library with what apple already has in it's vast library and any music in your library that Apple doesn't have they upload to the cloud with some exceptions. If this is the case then I don't think iTunes is actually uploading because you've already got everything in the cloud. I think it's just matching things up.

Do I need to wait for iTunes to finish?

If I quit iTunes, what does that mean for the other devices in the meantime?

If I quit iTunes and then launch it again, will it start uploading from the beginning again or will it continue form where it was?

No need to wait for iTunes to finish. Your music should be accessible from your devices if you've already had the service.

Same goes for if you quit iTunes.

iTunes will continue from where it left off when you quit it. So don't feel like you can't shut it down or turn off the computer.