The Parasite Cage Heartless in the first game bears many similarities to an early boss in Final Fantasy IX, Prison Cage. In both games, a character (Pinocchio in Kingdom Hearts and Garnet, then Vivi, in Final Fantasy IX) gets trapped inside the creature, and the main character (Sora/Zidane) must work together with his at-the-time enemy (Riku/Steiner) to free them. Both enemies are fought twice in total. Vivi and Pinocchio also share some similarities, as Pinocchio is a puppet who possesses a heart and a conscience, and Vivi is an artificial lifeform who also possesses a conscience and "heart".
To other franchises
The Darkside Heartless is named after Tales from the Darkside, an anthology horror TV series. The Twilight Thorn is called Twilight Zone in Japanese, referencing another famous horror TV series.
Part of End of the World from the first game seems to have been inspired by Nowhere.
Xigbar's title, "Freeshooter", is taken from the title of the German opera Der Freischütz. The eponymous marksman makes a Deal with the Devil in exchange for seven magical bullets; the first six are controlled by the marksman while the seventh is controlled by the Devil.
The last Gummi route in II, Assault of the Dreadnought, is a direct homage to Star Wars, particularly the Death Star battles in A New Hope and Return of the Jedi. Likewise, as a continuous homage to the theme naming from the Final Fantasy series, two shopkeepers (one in Twilight Town, the other in Hollow Bastion/Radiant Garden) are named after Biggs Darklighter and Wedge Antilles, though the presence of Jessie confirms they are based on the Biggs and Wedge of Final Fantasy VII, instead.
Terra's story in Birth by Sleep is a homage to Revenge of the Sith, right down to him succumbing to the dark side like Anakin Skywalker. Riku can even be seen as a paroral to Luke Skywalker, and Sora with Han Solo. Both Luke and Riku were tempted with the dark side, and succeed with what their father/predecessor failed: becoming a Jedi/Keyblade Master. Meanwhile, both Han and Sora take on Non Human Sidekicks with a Cool Ship, and spend a year frozen in carbonite or sleeping in a pod.
When crushed by the painting of Ansem (really Terra-Xehanort) in the manga adaptation, Sora mutters "Ansem strikes back".
Probably unintentional, but in the 2.5 version of Kingdom Hearts II Final Mix, the trophy obtained from completing the Pride Lands is called "Return of the King".
The trophy for completing all the Gummi Ship courses in KH1:FM or getting an S-rank on all EX Gummi Ship missions in KH2:FM is called " Top Gun "
The trophy for winning 100 duels in Re:CoM is called " Duel Master "
Young Xehanort belts out a "TOKI YO TOMARE!" in the Japanese version of KH3D when he momentarily stops time to rewind to the start of the boss battle. He also has an attack where he generates Icicles that after a brief flash of light, are inexplicably going to converge on Riku.