There are two comments to your question which are useful. Perhaps if either commenter had expanded on their comments they'd have had enough for a proper answer.
The first thing is, HR's job is not to get you a raise. If you believe there is genuine workplace discrimination going on (isn't clear from your question), then perhaps you might want to give that a go.
The way I read your situation, you were given an opportunity for upward mobility. Design work, as I hope everyone reading this will agree, is harder and "higher level" work than "development". As a designer, you would have influenced the work of many developers, as well as the final outcome of the product. You chose to stick with development. Nothing wrong with that -- design work can also be more demanding on ones time and quite often require that you spend additional out-of-office time keeping up with changes in frameworks or "design aesthetics". I spent a lot of time in my career as an architect, designer, developer, project manager, etc., and there is a definite hierarchy of "skill". I hate to say it, but you chose what is one of the lower skill level jobs.
On to the second point, which is a bit ambiguous because you don't say why you went from a team of 6 to a team of 2, but normally fewer people is also ... lower skill level. The only time it isn't is when you've increased productivity to the point that that team of 2 is doing the work of the old team of 6.
You need to get clear on why you deserve a raise given what seems like voluntary stagnation. If you made the wrong decision to stay a developer, I would try getting into the next open design role. If you helped increase the productivity of your team, with what would be a pretty huge reduction in labor costs, you need to address that. But nothing in your question points actually being underpaid, or to bad conduct on the part of your employer. You need to take charge of your career and actively work to move it forward. Or you need to accept that choosing a less challenging professional path is going to result in a less rapid rise in compensation.
(Edited to add)
Apparently some people think I’m referring to “design” in the more recent sense of “drawing things”. I’m not. I’m referring to software engineers who determine such things as interfaces, functional / procedural / data flows, performance characteristics, external resource requirements, etc. How software functions at a higher level than the code that is being written.
How code functions on something like a stand alone point of sale terminal is different than on a cloud-hosted collection of servers. Writing a filesystem for a wearable device is different than picking a filesystem from a pull-down menu when a server is going to be deployed. Resource requirements and limitations — which is traditionally part of the design process — is its own skill.