You can tweak google adsense for search code and make it validate without harming the functionality.
For the record, I use the validator plugin for FireFox, which nicely distinguishes between the validation errors caused by the page author and those caused by Google.
And yes, since Google Webmaster Guidelines keep telling us to create "well formed code" I think it the height of lunacy that the code they give us all to use on our websites is such crap. With all the brainiacs working there one would think they could add a dropdown box asking your doctype and then generate the proper code . . .