Some of Chandler's female characters, like Anne Riordan in Farewell, My Lovely, are memorable and genuinely appealing even if, in the same novel, there is also a description of a boatman on the waterfront as having pretty eyes. The soundest explanation though for such bad writing is alcohol, the pressure of a publisher's deadline, and that gaydar was not yet widely deployed.
The age gap in Chandler's marriage invites speculation, but the real story is unlikely to be that Chandler was gay. I once knew a couple with a similar disparity in age in which the wife was a vivacious mid forties, with the husband quiet and in his mid twenties.
They were happily married, with cats instead of children. The truth of their relationship was that the husband had been badly beaten by his mother when he was a child and sexually abused by a male teacher in high school. The chemistry of a good marriage to a loving and caring older woman had gotten him past the deep hurts of a miserable youth.
Was there a similar theme to Chandler's marriage? He was raised by his mother and packed off to an English boarding school. That cannot have made for an easy upbringing, and, despite Chandler's philandering, by all accounts, he was genuinely devoted to his wife. No gay lover or relationship by Chandler has ever surfaced.
I can wholeheartedly concur with your last comment. The writing can sometimes seem to have a whiff of lavender. Beyond that - all his basically speculation and in the eye of the beholder. Certainly alcohol played a part as you point out.