Was the Holocaust the ultimate goal from the beginning, or was the Final Solution the product of a peculiar set of cirumstances?
The only argument that can be made for the "Final Solution" being the product of a set of circumstances might be the one that considers the general circumstances following World War I in Germany that led to the rist of ultra-nationalist parties with much of their focus on the idea that the German race was a superior one and one that needed to be allowed to control their own destiny without interference from other inferior races.
But this idea was not peculiar to Germany as it was a commonly held view in many places in the world including the United States. It was used to justify colonial expansion in the Phillipines and Cuba as well as other places so it is not peculiar or unique to Germany.
If instead one looks at the history of the Nazi Party, it is clear that the control or even removal of inferior racial groups, in particular Jews but including any other race or group which was considered inferior or an obstacle, was a large part of their appeal to the populace. Given that their influence and power grew based on this platform, it is clear that their desire for action such as "The Final Solution" formed a major part of their goals from the beginning.
I believe that the Nazis goal from the beginning was to eliminate the Jewish populations from any country they conquered. The Final Solution was a core belief of the Nazi Party and a particular goal of Hitler. The Nazis used at least one concentration camp in the 1930's for the people Hitler wanted to eliminate and many of them were Jews. The Wannsee Conference formalized the Final Solution but did not create the goal. So, in my opinion, the goal to eliminate every Jewish person under Nazi control was the ultimate goal from the beginning. No peculiar set of circumstances really existed to explain The Final Solution.
Scholars have argued incessantly over the question on whether the Holocaust was a function of the circumstances (one that was influenced by the course of war) that the Germans found themselves in or an intentional policy that was pursued by the Nazis right from the beginning (the act of mass extermination was deliberate and was always intended to be carried out). In this case, the Germans seemingly had no other option to turn to in their treatment of the Jews. It started with the dehumanization of the Jews, who were increasingly classified in German society as humans with no rights – they thus had to be demarcated as separate with identifying marks. This was followed by ghettoization as Jewish citizens were forcibly moved to older and poorer neighborhoods and literally fenced in or confined there by the German police, as well as the military. Such acts, however, did not satisfy Hitler's aims for a Jew-free Europe and this was made clear as time progressed - extermination seemed to be their last possible option, especially when the tide of the war turned against them, and this was what they turned to as a solution for the Jewish Question.