Along with gypsies, Jews, and Slavs, where exactly did the Poles rank in the racial hierarchy created by Nazi Germany? Why were they so viciously and relentlessly killed and oppressed on such a large scale by the Nazis and Wehrmacht after the invasion of Poland? What was the basis for their belief that the Polish people were untermensch and should only be killed or enslaved?
This is a fairly deep topic that I'm not massively qualified to speak on. So I'm just going to briefly comment on your last point, the evolution of anti-Polish sentiment.
The first thing to note is that German anti-Polish sentiment long predated the Nazis. Poles were a persecuted minority in Germany before WWI, with Bismarck in particular ramping up the discrimination. From the 1870s onwards Germany's Polish population suffered successive 'Germanisation' campaigns and, from 1886, a programme of settling ethnic German settlers on Polish land. None of these approached the extremes of Nazism but a racist hierarchy of sorts (with Germans very much more deserving than Poles) was already in place before 1914.
As with so much else, WWI massively radicalised things. In particular it had two effects on racial thinking: German soldiers were horrified by the squalor and general 'uncleanness' of the lands they occupied, coming to equate the 'cleanliness' of home with order and progress. The second was that the struggles of wartime administrators to categorise the complex ethnic map of occupied territories led to the conceptual shift away from 'a land and its people' to 'space and race'. This abstraction effectively decoupled an ethnic group from the land it occupied and was key mental step towards advocating the clearing of 'space'.
These strains of thought, both the older reflex anti-Polish nationalism and the experiences of the Great War, produced a fairly toxic set of Eastern Studies (Ostforschung) during the 1920s that looked at how the 'messy' East might be suitably reordered. This typically called for the reclaiming of German space, or 'cultural territory' in the East. An obvious, if implicit, requirement for this was the removal of those currently occupying said space. It was from this milieu that the Nazis, and the wider German middle class, would draw much of the racial justifications that would escalate, via a series of practical challenges, into genocide.
Jorg Baberowski and Anselm Doering-Manteuffel provide a good overview of the evolution of German racial doctrine in an essay called The Quest for Order and the Pursuit of Terror. David Blackbourn's The Long Nineteenth Century: A History of Germany also introduces Bismarck's (unpleasant) views and policies on the Polish minority.