I accidentally corrupted /etc/sudoers and now the sudo command doesn’t work.
Is there any way to fix it without reinstalling the system or pulling out the SD card?
No. I think you are looking at re-installing, or mounting the SD card on another system and trying to fix it that way.
When you have it up and running again, I suggest that you assign a password to root.
Sudo is evil. The way it is used these days is a huge security problem. It makes Linux almost as bad as Windows.
Unfortunately, I think that the best choice that you have is to reinstall the system, so that everything will go back nominal, and you can start again from there. If you have made a backup image before this corruption happened, then you can try restoring that one instead.
However, if you want to try an alternative solution, I have found this on Google: sudo - How to modify an invalid '/etc/sudoers' file? - Ask Ubuntu Maybe it could be helpful to you.