The main driving factor was proximity. He was at the front in Belgium when, on 9 November 1918, he heard that his Chancellor Max von Baden had published his abdication without his consent, giving in to the November revolutionaries whose activities had started with the Kiel sailor mutiny on 3 November and had subsequently spread to Brunswick, Munich, Stuttgart and Frankfurt.
Even beyond the openly socialistic and revolutionary fervor present on many warships and in many city garrisons and among paramilitary socialists in the Empire, even the citizen class was openly talking about Imperial abdication, although usually in the more pro-monarchist framing of getting one of the princes to succeed the old man, rather than in the republican mindset of the upper class.
In his memoirs, the Kaiser notes that he was going to gather the troops to march back into Germany and restore order, but the army was no longer in shape to march from anywhere to anywhere and certainly not in the mood to fight a civil war.
The Emperor attempted to bargain, before the control over the situation was taken from him:
I wished to spare my people civil war. If my abdication was indeed the only way to prevent bloodshed, I was willing to renounce the Imperial throne, but not to abdicate as King of Prussia; I would remain, as such, with my troops, since the military leaders had declared that the officers would leave in crowds if I abdicated entirely, and the army would then pour back, without leaders, into the fatherland, damage it, and place it in peril.
[...]
The Imperial Chancellor, on his own initiative, had summarily announced my abdication which had not occurred yet at all! as well as renunciation of the throne by the Crown Prince, who had not even been questioned. He had turned over the Government to the Social Democrats and summoned Herr Ebert as Imperial Chancellor. All this had been spread simultaneously by wireless, so the entire army could read it.
With his army demoralized and disloyal, and the cities of the empire in open rebellion, the emperor had the choice whether he wanted to make true on his initial intention to crush the insurrectionists - and he had to choose his fate in general.
Some say the Emperor should have gone to some regiment at the front, hurled himself with it upon the enemy, and sought death in one last attack. That, however, would not only have rendered impossible the armistice, ardently desired by the nation, concerning which the commission sent from Berlin to General Foch was already negotiating, but would also have meant the useless sacrifice of the lives of many soldiers of some of the very best and most faithful, in fact.
Others say the Emperor should have returned home at the head of the army. But a peaceful return was no longer possible; the rebels had already seized the Rhine bridges and other important points in the rear of the army. I could, to be sure, have forced my way back at the head of loyal troops taken from the fighting front; but, by so doing, I should have put the finishing touch to Germany's collapse, since, in addition to the struggle with the enemy, who would certainly have pressed forward in pursuit, civil war would also have ensued.
Still others say the Emperor should have killed himself. That was made impossible by my firm Christian beliefs. And would not people have exclaimed: "How cowardly! Now he shirks all responsibility by committing suicide!"
The final straw to seek refuge in the neutral Netherlands was the threat by the Entente to put the emperor on trial. In his memoirs, he cites the possibility of his trial as a war criminal as a permanent and irreversible roadblock to German emancipation in the post-war world, as the country's prestige, were the monarch to be prosecuted, would be forever tarnished. The man, unhumbled by defeat, was still quite self-important as you can tell.
The only country that was possible for him to reach and to go into exile to was the Netherlands. Even Denmark and Switzerland, both of whom could have been reached without having to bypass naval blockades, were separated from the Kaiser's location by river lines and cities under control of the revolutionary insurrectionists. And so, Holland was the only choice.