It represents both in that it represents a historical episode that very much involves racism and slavery. That being said, in as much as the Confederate flag represents racism or slavery, so does Old Glory. Remember that slavery wasn't outlawed in the United States until the adoption of the Thirteenth Amendment in late 1865, which is not to mention the racial strife that followed for, if we're being generous, the next 100 years. So no one has the moral high ground to criticize the flying of the Confederate flag.
Actually, every family of former slaves has that moral high ground. By the way, there is probably not a single African American in this country who views the star spangled banner as an emblem of racism. They likely do, however, view, to the last man, woman, and child, the confederate flag as a symbol of racism. Surely you've figured this out by now.
I doubt if there are any family members of former slaves left living in America who were effected by slavery. Oh - sure - some can trace their ancestry back to people who were slaves - we know the last surviving member of Thomas Jefferson's bloodline is alive today, and can be identified, but the Southern slave owners never kept written records regarding the births, deaths, burial sites of slaves, and sold them off at will, scattering any possible, traceable record of direct descendant, making it almost impossible to find.
The Black community does find that Confederate flag offensive, and as I pointed out, the one we see in modern times isn't the Confederate battle flag, but their naval ensign. The two schools regarding its display are Southern pride and identity; graves of dead Confederate soldiers, and murderous white extremist groups which arose during Reconstruction and terrorized the largely uneducated Black population, about 5 million of them, freed at the end of the war.
Lincoln's Emancipation Proclamation only freed the slaves in the states in revolt against the Union at the time. That they find the flag offensive, fine, they have managed to ensure it doesn't fly over United States government buildings or institutions. Although the first persons buried in Arlington National Cemetery were dead Confederate soldiers, their graves are not marked with Confederate flags. A Black boycott of the State of South Carolina in recent years got that flag, flying over the State Capital Building, removed. The boycott was successfully aimed at South Carolina's tourism industry - and also included pleas for tourists and long haul trucker's to drive straight across that state refusing to fuel their vehicles. They were successful - however - the flag, after being removed from the State Capital Building, was subsequently flown over the Confederate Memorial on the State Capital grounds, and does so to this day.
One can't separate the racists from the zealous regarding this flag, but racism in America isn't confined to the South, cities like Boston and Chicago have throughout their history, had horrible race relations with the Black community, particularly Boston, and it was the hotbed of the abolition movement during the Civil War, raised and equipped the first Black military regiment to go into battle for the Union. Flying it from front porches or private residences; stock car races; public cemetery's, Civil War monuments in the South, nothing wrong with it as long as it is done on an individual basis. Heck, one can purchase and fly the German Nazi flag and it is protected by free speech, as long as it isn't invading on others. Same with the old Confederate flag. People in New England Patriot regalia, license plates and Patriot's NFL flags upset me more than seeing the Confederate flag flying anywhere..............