I'm not sure how closely Starfleet follows naval tradition, but from how I see it, Spock is not totally incorrect about calling Kirk 'Commander'.
Traditionally the commanding officer of a vessel is addressed as "captain" regardless of actual rank held though a flag officer in the chair may retain his/her normal title of address. Since the ship's master is THE
Captain, captains from other branches on board are verbally called by the next highest rank (Army/Air Force/Marine Captain -> Major) to avoid confusing the crew.
Kirk lost the command position, but I don't recall him losing rank. As he still holds the rank of Captain, he cannot be "promoted" as Commodore/Rear Admiral is a flag officer rank. Spock had no evidence that an Admiral such as Pike was assuming command rather than another captain, so the only other choice from his perspective was a verbal 'demotion' to Commander.