This issue is usually caused by a physically damaged / worn charging port or the battery itself.
Charging port requires soldering so for that one you will need to take it to a repair shop that does Samsung Tablets.
For the battery it is user replaceable and fairly cheap to do. $15.
Here are link to parts and guide from iFixit:
Samsung Galaxy Tab A Battery Replacement
Samsung Galaxy Tab A 8.0 Battery
A red blinking notification LED light at the top left only when charging usually means that the device thinks that the battery temperature is too low.
This is usually a fault caused by a component like a thermistor (temperature sensor) in the charging circuit sometimes from liquid damage or damage on the charging port itself.
But I don't think that is the case as it would usually say 'Battery temperature too low. Charging paused' and the device would actually stop charging with a blinking battery icon.
Does it charge fine while it's turned off? anyway it's probably just the battery in your case.