I'll answer this from an employer's perspective.
Technical ability is a necessary but not sufficient condition - the skill I value the most in my employees is their ability to manage expectations. I am also very mindful of the fact that most people can't do this well at all.
People higher up the chain have better oversight of what needs to be done, why, and by when. It is perfectly ok for something to take a long time, it is definitely not ok for management to be blindsided by this. If a task is going to take longer than expected, management needs to know asap, because they have oversight of the entire project. Some things they might choose to do if they do know:
- Hire more people
- Reassign more people to work on the project
- Hire an experienced contractor for a short time to help out
- Cut features to meet the deadline
- Postpone the project until more critical things are completed
- Cancel the project altogether
These are all management-level decisions that can only be made if management is aware of the reality of a situation.
The macro-level problem here is that employees typically think that their responsibility is to come up with a "how", but this is not the case. Management & employees are supposed to work together to come up with a "how" that fits the "what" and the "when".
A sign of a good manager is that they understand how hard this is, and they are upfront with you about how this is going to work, what exactly is expected of you, and how they are going to evaluate your progress. You will agree on time estimates, in the beginning you will get it wrong, you will have honest conversations about why, and a good manager will help you understand how to manage your time and expectations better. A bad manager will tell you "make sure this never happens again or else", without telling you what to do about it.
For instance, when I need something done, I will sit down with the person who will be responsible for it, we will discuss to define what work will be done exactly (or what work needs to be done to figure out what to do in the first place), and at the end I will ask them how long they think it's going to take. I will also give them an idea of the greater picture by letting them know how their task fits into the greater sequence of tasks that other people are doing, and how other crucial things done by other people depend on the timely completion of their work.
As a rule of thumb, for junior people I will assume it will take at least 3-5 times their estimate (sometimes 10x), for senior people about 2x, and for team leads it's usually done about as quickly as they predict, because they add the multiplier themselves.
I should also point out that this is the part of the job most people struggle with the most, as being able to manage time and expectations well is not something universities prepare us for - it typically comes with experience. This is a very high-level skill, even experienced people can be shockingly bad at this. In industry terms, this makes the difference between a team lead and a senior person.
So, from a practical point of view, what does this tell us about your situation:
- Managing expectations is 100% your responsibility, especially if you are the only person at the company with a particular skillset. No-one has the knowledge to set proper timelines except for you.
- You are most definitely not expected to be able to do this well straight out of uni. You are however expected to be proactive in improving your ability to do this well. Just be mindful that this is a life-long process, it doesn't happen overnight, and that's ok.
- It 100% ok to tell your manager that you don't believe you can do what they ask in the time they want you to do it. A good employee does this routinely, and a great employee will suggest how to adjust the project's objectives to fit the management's timeline.
- You will only be judged unfairly in two cases: (i) if you don't manage expectations well, which is up to you, and (ii) if you have a bad manager, in which case you should probably find a different job.
- As a junior professional, always multiply the time you think you need by 5, until you start to feel confident about your ability to estimate time well.
Finally, to answer the OR-specific part of your question, unfortunately it's unlikely that you'll be able to communicate the complexity to a non-optimisation person. You should of course try to communicate that this is complicated stuff, but at the end of the day the people employing you should trust you, especially if you are the only person with the know-how, which by definition makes you the resident expert. If the expert says X needs two months, and they do deliver X in two months, everyone is happy. If management says "we don't have two months for X, we have 1 week", then it is the expert's job to stick to their guns and suggest alternatives.
If, despite your efforts, management is still being unreasonable, it's time to find a new job.