^ I'm afraid I almost completely disagree with you. What I like about the characters seems to be what you brush aside as 'picture-perfect.'
Kirk didn't cheat on the test because he was dishonest, but because he believed the scenario was fundamentally flawed - the test wasn't accurate or fair. He broke the rules out of principle (as he would regularly in his career). He clearly, in-scene, didn't believe his own words against the Klingons, though he found it doubtful he'd ever forgive them as a culture (not, necessarily, as a race - everybody's human in his point of view, as he said to Spock in the same film). And I seem to recall a statistical analysis of Kirk's romantic escapades with those of the other captains (and several of the TOS principle cast members) in which he was the least apparently sexually active of them, and which demonstrated that most of the circumstances in which he interacted romantically were on behalf of ship and crew. (Edith Keeler, Miramanee (amnesiac), the lab technician he almost married (Carol Marcus, probably), and Ruth were the exceptions, as I remember - light, perhaps, for a person of thirty-seven. No wonder Kirk was regarded as such a straight arrow by Mitchell.)
McCoy's irascibility was the thing I most disliked about him. Nonetheless, he was certainly not racist. Had he not ultimately been a close friend on Spcok, I'm certain he'd never have said the things he did (I had several not-especially-close friends in high school who used ethnist terms as terms of endearment amongst themselves, and in reference to themselves, but who would never have accepted those terms in any context in which they were actually meant). What I liked most about McCoy was his kind heart. He cared - about life, about persons - perhaps more than anyone else we've ever seen on Star Trek.
And Spock . . . I suppose he can be credited with being mostly logical and mostly very reliable during the Original Series, but I never liked him on the show. It wasn't until he mellowed (and, paradoxically, acutally became more logical) during the films that I enjoyed the character. So, I suppose you're right that' he's unlikable. On TOS, I like Spock's respect for his parents, but not his inability to see how weakly-founded his purportedly logical positions actually are.
Simply (and probably about all I should have written), I do
like them for their virtues in spite of their flaws.