Racism and sexism were pervasive in Steve Rogers's time, true, but there were definitely those standing against them even then. In fact, I recently read a compelling article pointing out that Cap was originally written as very much a New Deal Democrat and social progressive:
Steve Rogers grew up poor in the Great Depression, the son of a single mother who insisted he stayed in school despite the trend of the time (his father died when he was a child; in some versions, his father is a brave WWI veteran, in others an alcoholic, either or both of which would be appropriate given what happened to WWI veterans in the Great Depression) and then orphaned in his late teens when his mother died of TB. And he came of age in New York City at a time when the New Deal was in full swing, Fiorello LaGuardia was mayor, the American Labor Party was a major force in city politics, labor unions were on the move, the Abraham Lincoln Brigade was organizing to fight fascism in Spain in the name of the Popular Front, and a militant anti-racist movement was growing that equated segregation at home with Nazism abroad that will eventually feed into the “Double V” campaign.
Then he became a fine arts student. To be an artist in New York City in the 1930s was to be surrounded by the “Cultural Front.” We’re talking the WPA Arts and Theater Projects, Diego Rivera painting socialist murals in Rockefeller Center, Orson Welles turning Julius Caesar into an anti-fascist play and running an all-black Macbeth and “The Cradle Will Rock,” Paul Robeson was a major star, and so on. You couldn’t really be an artist and have escaped left-wing politics. And if a poor kid like Steve Rogers was going to college as a fine arts student, odds are very good that he was going to the City College of New York at a time when an 80% Jewish student body is organizing student trade unions, anti-fascist rallies, and the “New York Intellectuals” were busily debating Trotskyism vs. Stalinism vs. Norman Thomas Socialism vs. the New Deal in the dining halls and study carrels.
And politics aside, Steve Rogers (as the movie makes clear) is simply a scrupulously fair and good-natured man who doesn't like seeing anyone bullied or mistreated. Having been bullied and helpless himself, he sympathizes more with victims than with the powerful, which, in the movie, is why Dr. Erskine is willing to trust him with the power of the serum. So he wouldn't have been the type to go along with the institutionalized discrimination and injustice of his time.