The Spanish can sell Philippines before 1898 not after or during. Of course they can still sell the Philippines after but The buyer would have to fight a war just to get de facto control for a span of a decade or more just like what the US did in OTL.
Just dont know if other countries would have been hawkish enough and bold enough to take that risk absent of Germany.
I read about Germany wanting to buy the Philippines in Dreadnought by Raymond K. Massie. IIRC Kaiser Wilhelm was livid when the Americans beat Germany to them.