This is not about "class" it is about shared values, tastes and belief systems.
This is not to brag, but to put things in context - I went to a top public school, am from a very upper-middle class wealthy professional family, with the associated trappings, have 3 good degrees, have traveled widely, have hundreds of books which breed, am well read, posh spoken accent, go to the theater, like classical music etc, etc.
My DH left his state school at 16 with no qualifications, is a "manual" worker (farmer), rarely reads (except the Farmers Weekly), has a regional accent, rarely traveled, etc. etc...
You'd claim that we were completely unsuited to each other based on our backgrounds alone.
Yet, I am married to the most amazing man. We are good friends, have shared values, a shared belief system, shared senses of humour, we like each others friends, he is kind, thoughtful and I am thankful every day that he is my DH. Our backgrounds are irrelevant, because we are happy with each other and who we are. Yes, we have our "challenges" but they are through general daily life challenges, rather than anything to do with incompatibility.
Yes, the relationship can work - DH and I are proof of that, BUT, and this is a BIG BUT, I don't notice our differences, I don't temper who I am or what my hobbies are with DH, I certainly don't measure my words so I don't use long ones, and I respect him for who he is utterly and I don't mean in a surrendered wife context, either - I mean in a I don't want to try and change him from who he is context.