I'm a project manager and a programmer :-) I could go on a long rant about how most PMs are from outside the industry and can't handle anything that doesn't fit nicely into a production line model... but I won't, not here. Instead here's a long polemic on what to actually do (Mr Mod, if it's too long do what you will with it). I agree with the comments already made here, some you should do before others, but here's what I think would have best been your first move. Oh, and obvious answer to your question is yes, but that's elaborated in colourful & detailed language below.
Before I start though note that the PM is most likely giving you grief, because someone else further up the food chain is giving them grief. They (we) are simple creatures... There are ways to avoid the situation you described - Mike Brown covers that pretty well. There's also nothing wrong with workshopping something for 3/4/5.. hours straight before kicking off on it (actually all kinds of alarms need to go off if this doesn't happen). And if you are going into unknown territory, push back and ask for a week to research the area & technologies to be able to make a sensible estimate (you'll want to do this properly because you want new tech to learn & play with don't you?). If your PM and the management at the place you are at don't understand this... then update your resume and look for the nearest exit, leaving them to the fate they so richly deserve. That the PM would even think of getting a full time employee to sign a contract like that is a bad bad sign... the only way I could see that they might not be totally incompetent is that they were really just playing mind games with your project lead and you (from what I read they didn't put this directly to you, and didn't ultimately follow through on the threat). PMing is a haven for your standard corporate psychopath after all. It was good that others went into bat for you from what you said, so the advice below would have probably turned out positive for you in the end. I imagine they would have had a revolution on their hands if it turned out to be more than talk.
So to the actual situation/hole you described, because it's going to happen again to somebody, somewhere ( like about 5 minutes ago, and again in another 5, scheduleRepeat() ). Probably without the contract stupidity, but the basic storyline is always the same. Organise a meeting(!), they like meetings ;-) everyone can pat themselves on the back at the end like something was actually done. IMPORTANT: Make sure you include your technical project lead/team leader/architect/design manager in the meeting invite having already gone over the issue with them and gotten them on board. The higher up the hierarchy you can go for someone on your 'side', the better. Because your PM will see that and try and match your design manager with an equivalent. If not, they're dumb and you've already won. That in itself will generally pull them back into line, because now they are visible to someone who can probably sack them on the spot. If they are playing games with you, you are allowed to return the favour.
In the meeting, go through the technical details of what you are dealing with and why it takes the time it does. They should want to know this (and how they can help you get it done), but the sad fact is generally this doesn't happen... you'll probably get 10 minutes in before their eyes roll back into their head. Now what I would want done here probably isn't legal... yeah, I checked, it is highly illegal actually and you don't want to go to jail for that long. The point is you've put in a best effort to be proactive and if you've got some higher-ups present, your pain is now theirs... as it should be. You'll have to use your judgment on how things are likely to play out, because 'escalation' is what will happen. If the leadership at the place you're at is half decent they will do the right thing, and do the right thing by you as well. If not, then you would have had your resume out in the marketplace beforehand... you were going to leave at the first opportunity anyway (and looks like you did ultimately). The leadership will fall into two groups - either they are technically savvy and they will instantly see your point of view; or they aren't and what are they going to do about it other than grin and bear it? If they could do what you do, then they would already be doing so.
Keep the changing requirements issue as your trump card to use at the end... it will serve as an out for everyone. The project itself and the damn client/stakeholder will have their name taken in vain. The most painless way forward would be for a kind of reset to happen on the project, and maybe that PM would be quietly reassigned to a different area. Miracles do happen occasionally. If the contract issue was raised in the meeting by the PM, then hit back with the requirements freeze counter-contract demand - as far as I'm concerned they already burnt their bridges with you, and to the entire development team, when they started playing those kinds of mind games.
Before I sign-off: Changing scope/requirements - one of the best reasons to adopt the Agile methodology, so the clients/stakeholders are properly accountable for changing their minds about what they want...
Oh, one other thing: on the "I don't know" statement, has always been my personal benchmark on how to gauge the worth of a fellow technologist or member in one of my project teams. I find the only people who are able to say that straight to your face are the best there are, primarily because someone who knows they are out of their depth will never say that - opens them up to being clearly exposed by someone with actual ability in a heartbeat. On the other hand someone who will front up and say it, will also have a basic plan (even if it hasn't been thought thru) on how to tackle the unknowns so that in 24 hours there'll be a more useful answer, and in a week's time an even better one. When Apollo 13 was flying around the dark side of the Moon, there were a whole bunch of "I don't knows" happening. If you can't deal with that sort of thing, you're in the wrong game.