This may not be true. From the German Wikipedia article (translation by Google):
However, he did not publicly criticise the anti-Semitic acts of violence. Foreign newspapers reported that Wilhelm had declared that he was “ashamed to be a German for the first time in his life”. The historian Stephan Malinowski describes the interview in which this statement is said to have been made as a fake and refers to several denials by the ex-emperor.
This may not be true. From the German Wikipedia article (translation by Google):
However, he did not publicly criticise the anti-Semitic acts of violence. Foreign newspapers reported that Wilhelm had declared that he was “ashamed to be a German for the first time in his life”. The historian Stephan Malinowski describes the interview in which this statement is said to have been made as a fake and refers to several denials by the ex-emperor.