I'm not sure if I understood you correctly, but I'll express my personal opinion.
I can't even imagine the possibility of undercutting in this situation, and I don't think these people are to blame.
Only aggressive marketing is to blame. A bunch of low-quality courses create false expectations and overheat the junior market. It's bad for everyone, both for the workers and for the employers, who waste a lot of time trying to find the right person in this sea of candidates.
And what is undercutting? I can only imagine two scenarios, and I don't find it in either. Either the company is looking for someone to replace someone who has left. This is already a certain rate or salary range, and it doesn't actually depend on the applicant's wishes. The second option is a new vacancy. And what about that? The logic is, "Well, there are plenty of juniors, so we'll offer a low rate"? No, of course not. The main goal is not to save money, but to find a specialist who will do a good job.
And here's another point. The initial selection is done by technical specialists, who are not allowed to discuss salary expectations. The applicant cannot undercut at this stage. They can only demonstrate their skills. It is only later that they may be rejected due to excessive demands if the company is not willing to offer such a salary.
And the fact that people without experience are willing to accept a low salary in order to get their foot in the door is, in my opinion, a perfectly normal situation, both now and 10 years ago. I would do the same.
At the same time, there are experienced IT specialists who are very modest and reserved, and when asked about the salary, they will say how much they earned at their previous job, and they will then be offered at best 5-10 thousand more than before, while their value may be as high as 300k.
In principle, I can say that I have personally encountered situations where employers cheat on salaries because of this very question. For example, a few years ago, at a factory, they asked me, and I replied that I would not agree to less than 35-40k. As a result, it turned out to be about 37 per month after taxes. Later, a girl joined the team in another department, who had a workload of 100k+, but she hesitated during the interview and said that she would be happy with 30k. As a result, that's exactly what they offered her.
Or a more "recent" case. A friend, an IT specialist, initially without the necessary experience and education (only self-education and experience in a call center), got a job in technical support in Moscow at a company that provides services for software and servers for MFCs, schools, and other government agencies. Initially, he was given a salary of 75k with the condition that after the probationary period, it would be increased to 85. Later, they hesitated, and for several months they didn't raise it. When they realized that he was ready to leave, they offered him 100. Gradually, over 2 years of work, they raised it to 130. He thought about leaving for a long time, but the New Year's bonus of 250k kept him going.
There were several other specialists in his position, and they were all forbidden to discuss salaries (everyone except him was kept in the office, and there was constant monitoring of what they were doing, what they were writing in their personal Telegrams, etc.). As a result, when he and a couple of colleagues decided to leave, and everyone stopped caring about the ban, it turned out that he was the only one who received such a salary and New Year's bonus. The rest were still paid 75-85 (one of them didn't forget to ask for a salary increase after passing the probationary period, the second hesitated), and their New Year's bonuses were about 30k.
So, unfortunately, in the current realities, the salary is formed not only by the employer's offer, but also by how well the employee "sells" themselves.

