Whether Rand had an unrequited love for Kirk is irrelevant, Spock was being wholly inappropriate in his comments to her.
I guess I just have some extremely informal friends and workmates - I could easily see someone i know (in the situation) teasing her, hey, you've wanted him anyways, ya sure ya didn't like it? be careful what ya wish for? hey isn't that what you wanted? with absolutely no negative intent - if it was an informal setting instead of the bridge of a starship, and the two were closer friends, the context may have come across a bit differently.
I just don't believe Spock to be the kind of person that would make the comment in the traditional sense, and am looking for his internal context. He is used to needling (and being needled by) his crewmates in good fun. His exchanges with McCoy aren't that far removed.