What is the polite response to this nonsense? Are you still supposed to respond to recruiters who clearly didn't spend a minute reading your profile? Or do you just ignore them and don't respond at all?
The answer is in the question - the "polite response" is a polite response.
Bit if you're just looking for validation from the internet to not be polite, then here you have it - it's ok if you don't respond to a recruiter who you don't want to respond to.
Spam does not deserve a polite response, and responding to spam is, in fact, detrimental to the rest of the Internet and rude to the rest of us using it.
So you are being rude when you do respond to spam - and including LinkedIn spam.
Now you're just making up new meanings for these words. While I agree that you shouldn't respond to spam, there's nothing "rude" about responding to spam, and nothing "polite" about ignoring a message.
If they definitely didn't read my profile, I ignore them. Also if they contact me when I'm not even looking, which is most of the time.
The companies that such people are attempting to recruit for, probably share my dislike for those that can't tell the difference between platforms or languages.