I know I am going out a bit on a limb here, but I do want to draw attention to your statement that
the task always takes way longer than estimated and is done pretty badly.
TL;DR: Talk to whoever is assigning tasks, and when you are assigned a task, give them your best estimate for how long you will need to complete the task. Then let that person decide whether that amount of time is reasonable, or if the particular task should be assigned to someone more experienced.
First, this answer hinges on the fact that you do mention to those who are assigning you tasks that you will have difficulty with them, and that this is accepted. Particularly in a junior role, even if only with a specific technology stack, that really should be accepted; nobody can expect someone who has only worked with a technology stack and a mass of source code for half a year to be as productive as someone who has been doing the same for years.
The second half of your statement is obviously due to lack of experience with the technology stack. It sounds like you are doing some kind of programming, in which case: just remember that it is perfectly normal for early attempts to suck (except if you are designing a vacuum cleaner, in which case it is normal for later attempts to suck more). If you can look at code you wrote half a year or a year ago and not ask yourself "who would write code this ugly?", then you aren't improving. It comes with the job; don't sweat it. Just do your best and keep trying to improve.
The first half of your statement, though, is one that you can deal with directly.
Let's say that there is another programmer, named Joe Hacker, at your workplace. You and Joe work together when Joe has time to help you out, but unfortunately, Joe is regularly swamped with other tasks and so you are asked to take on some of the work. Joe has been with the company, and worked on the code base, for many years, and code just flies out of his fingers as he is typing, never seems to have a single bug and is trivial to modify or extend when the need arises.
Your boss, scrum-master, project manager, team lead or whatever the title, Jane Manager, asks for a time estimate for some particular task. Joe answers that it should be completed in two days, and Jane assigns it to you because Joe is busy with other things. But you know from your own experience that with the technology stack involved, you regularly need two to three times the time that Joe needs, to get a task done. (Obviously, adjust this part to match reality in your particular case.)
At that point, if not before (depending on how estimates are given), you raise that with Jane. Tell her that the two days estimate might be accurate for Joe, but it isn't accurate for you. Offer your best estimate at what the task will take for you to complete: about a week.
Now, Jane has a choice to make. She can either let you do the task in question (knowing that it will take longer than if Joe did it, but that hopefully the gap will close as you gain more experience), or she can wait for Joe to be free to take it, or the requirement that the task be done can be dropped, or something else that Joe is working on can be de-emphasized in favor of the new task. In all but the first of these cases, Jane chooses another task to assign to you. That is her role in all of this.
Now, this would obviously look bad from someone with a lot of experience with the technology and a solid track record under their belt. But you currently don't have either. As long as you are continually improving, and trying to improve, this should not be a major cause for concern.
Just give whoever assigns the task to you your best estimate at how long you will need to complete the task, and let them decide whether spending that time on it is a reasonable business decision. Then do your best to meet the estimate you gave.
As for the quality assurance team, their job is to poke holes in what you have done, so that the customers don't need to encounter those problems! As long as the bugs they find are not consistently in the specific use cases described in the original feature request (which means you didn't do your part of testing before handing your work over to QA), you should consider bug reports from QA a favor and an opportunity to improve your work. Getting bug reports from QA during testing absolutely beats getting bug reports from customer support in the live environment.
You can and should also consider what you can do, and what the company can do for you, to help you gain the experience sooner; and you should discuss that with your boss (who may or may not be the Jane above). But it is better to give a reasonably accurate estimate of how long something will take and let whoever is in charge decide whether that is a good use of the time, than to commit to an estimate you know is unlikely to hold. Nobody reasonable should be upset if you say four days and it ends up taking four days plus two hours, but they probably will have cause to be upset if you regularly commit to two days and it ends up taking a week.