Is economics a hard science?
Very easy question. It isn't.
Medicine, psychology, sociology, theology, philosophy, engineering all aren't either.
There are only 4 hard sciences (or more if you want to consider certain parts separately)
* physics (inluding astrophysics and astronomy)
* chemistry
* biology (although more specifically biochemistry & biotechnology, actual biology can be an edge case)
* geology (including some technical parts of geography) is often forgotten, but definitely a hard science as well (although you could argue that it's applied chemistry and I wouldn't truly disagree)
These have in common that they study basic existing structures with a natural structure that could be objectively observed if we were all-knowing and all powerful.
Hot takes:
* Mathematics itself is not a science, it's mathematics. It's the basis of all sciences. Applied mathematics can definitely found in many parts of science everywhere, but as a concept, it's still abstract and not observable. Whenever it's observable, it's part of an actual science (hard or not).
* Statistics is not a hard science either. Theorethical statistics is in essence a part of mathematics, see above
* Statistical or other data-analysis (e.g. machine learning) is the field specialised in the analysis of data in other fields, so not a hard science by itself
* computer science is often applied mathematics, and when it's applied on existing concepts, it's based on man-made structures, which to me makes it an applied science, not hard science.
Now, I mean no disrespect to economy with that. In economy, there is a lot of very useful applied science (i.e. usually called soft science) going on, and some part of economy, i.e. actuarial science and econometrics are almost or in essence applied mathematics and/or statistics.
The problem with economy however, is that it's extremely diverse. Some parts of it are extremely technical, econometrics is by all means a great source of statistical theory, while other parts are in essence philosophy and gambling.
Talking about that, medicine is the same. Clinical trial research (i.e. research in how to perform a clinical trial as efficiently as possible) can get very technical and basically be theoretical statistics / applied mathematics. However, some "reviews" in medicine are in essence, again, philosophy.
Reading that, you may think that I dislike philosophy, but I don't. It's just not a science, it's philosophy. Thinking can be fun, and you can think a lot about people think. It's a nice exercise and it helps to be open minded. But the real science about that would be neurology.
Psychology and sociology are people pretending or trying to be scientists and every now and then actually not being too shabby about it. Sadly, the majority of pyschology and sociology research is drenched in researcher bias or confirmation bias. Which is a concept from psychology, so some of them at least realise what they are doing wrong.
Engineering finally, is basically the (study of) the real-life applications of science. It's by itself obviously not a science, but lots of research done in engineering departments is actual hard science: physics, chemistry and biotechnology for example.