If they fixed scope and time all you can do to make the deadline is drop quality.
If possible drop external quality, visible to stakeholders, do not compromise on internal quality, stuff that hurts your habitability in the codebase.
I really don't think self improvement is going to help you any bit in this situation. If anything then, sorry to say, usually it's assertiveness.
Try to get a foot in the door when work is estimated. How can your boss estimate how long -you- take to do something?
Bring choices to your boss and/or customer. Too often it's developers themselves who choose to drop quality without communicating anything. Late projects/work is very common and typically 'managed'. Act on it on time, warn people if you see a missed deadline coming.
They can't cut scope or move the deadline if you tell them nothing.
If you are going to compromise on quality in any form, try to let it be their decision. Give them stuff to weight against each other.
Some stuff only YOU can decide. If you just about got it to work. But it's very unmaintainable. Perhaps you are unsure if it works in all cases. Don't tell anyone you are done. Redo it. Very often it's a decision only you can make. Either because the problem is very time consuming to articulate or you have a non-technical manager.
Sometimes it's part of your work ethic, would you just stitch a patient up without washing your hands cause 'there is no time'?
Above all, remember: there is no later.