First of all, carbonic acid is not a harmful substance at all and it's everywhere. We have it in our blood and it's in all the water and just about every beverage you drink! It's a bit different from what you may think of as an "acid". Carbonic acid can simply be thought of as CO2 gas dissolved in water. H2O + CO2 = H2CO3. In practice, the carbonic acid is not much different from CO2 gas dissolved in water, so when you lose carbonation, you also lose the "acid" component because the carbonic acid will just break apart to again form CO2 and H2O: gas and water, so the CO2 IS the "acid" here.
Getting a bit more complicated, the CO2 that is dissolved in water or beer actually takes on many different phases and exists in a few different phases at the same time. We usually have CO2 gas sitting above the beer in a separate phase, and then that CO2 is in equilibrium with CO2 that is dissolved in the beer. A little thing called Henry's Law tells us that these two pressures are proportional and the gas moves back and forth between being dissolved in and being "on top" of the beer. Once the CO2 is dissolved, another thing can happen and that is that it can lose a hydrogen (H) to create bicarbonate (HCO3-) and an acidic H+ ion. Or it can lose both hydrogen ions to make two H+ ions and a CO3-2 ion (carbonate). How much of which ion is produced at an equilibrium state (pressures and temperatures being equal) depends on the pH of the beer or water solution. The more acidic the beer, the more of it will be in the H2CO3 form, and the more basic, the more will be as bicarbonate or just dissolved CO2 in solution.