The concept you seem to be trying to convey is that city A is different from city B (because of B's eccentricity) and is similar to city C (because of shared values about education and culture).
The first problem with the construction has to do with the language chosen to express similarity and difference. The second has to do with the bases for the comparison.
You could say
I only heard in the past that this city did not share the other city's eccentricity but was more akin to this third city, in its interest in education and culture.
The two clauses are not exactly parallel in the meanings of the contrasting terms. The phrase did not share is a statement of lack of commonality, but does not express the same level of intrinsic quality that the term akin does. While both address characteristics, akin has an implication of a blood relationship and seems deeper than sharing a quality.
But the comparison is further complicated by the contrast being between eccentricity and an interest in education and culture. Do you mean that city B's interest in education and culture was eccentric? Do you mean that B is eccentric in other ways? Are level of eccentricty and interest in education and culture just two factors in comparing cities to ascertain their similarities? The comparison itself seems somewhat flawed or at least incomplete.
Finally, the overall expression could be clearer if it were easier to identify which city you are talking about in each case, rather than just saying this city, the other city, and this third city.