As German my perspective:
Sure WWII influenced the role of WWI for the coming generations. Once you get the role as baddie, it is quite hard to get away from the image which is quite understandable for the reason that Germany played the main role in two(!) of the biggest wars ever known. It is even more understandable because in the second case Germany acted like a real villain.
But, and this is a big but, the perception of history is influenced by the winning powers.
You asked about WWI and as some answers want to paint Germany as baddie, too, so I feel compelled to give some counterpoints. Because it is quite a tragic incident, I will tell it with a spoon of black humor.
Denis answer about the arms race are straight to the point, but the brazen rhetoric and arrogant, haughty behavior came after Bismarck's dismissal. Bismarck had built before a network of pacts and relationships which were neglected and antagonized the other nations with the behavior. Everyone believed that the own nation was superior and should lead the other nations (imperialism, wink, wink), but Germany was the only one who informed the other nations of this attitude. Essentially we sucked big time at diplomacy, but we were also a militaristic power which was growing alarmingly strong.
The last fatal mistake was giving Austria-Hungary (which was also a fledgling power because it was a state with many nationalities) carte blanche and allowing Austria to threat Serbia and its protector Russia, so that really every major power was antagonized.
What happened now is important: Nobody knew or expected what was going to happen. War was romanticized (Paintings, games for boys etc.) and seen as a valid political option and a power contest, it was also often quite restricted in dimension and time. The parties should have looked at the experiences of the technological American Civil War which was quite a warning about the new massive defensive capabilities. There were nobody saying at this time (or at least meaning) "German is waging a war of aggression!". If you see the images of soldiers it looked like they were going to a holiday. Kick the other's nations ass, get the capital city and everything is fine.
Now to the bad reputation.
After a short time it was clear that it will end in a two-front war, something which Bismarck wanted to avoid at all costs and also the German commanders knew that time were working against them. So they wanted to throw down France as fast as possible. The idea of the Schlieffen plan was to flank France through the occupation of Belgium. Some background information which is conspicously missing: During the 1871 campaign German command experienced strong resistance by partisans (franc-tireurs) which resulted in brutal retaliation. Fearing that the march through Belgium could be contested and delayed, the Germans reacted with excessive force of real and imagined attacks: mass executions and burning down of whole villages, especially Dinant and Leuven. But during the 1871 war the very same, but rarer brutal reprisals were irrelevant for England because France was the archenemy, but now as ally the real atrocities were not even enough: The English press and offical channels invented fairy tales of horrors. Babies spiked on bajonets, women hacked to pieces or breasts cutted off, little girls raped, little boys maimed on hand and feet, nuns tortured and bound on bells. The bloodier and gorier, the better.
But at least it seemed to be not enough: During Christmas 1914 it came to completely unexpected scenes of affection between the trenches. Sure, the British and French soldiers couldn't be that dumb to give child-raping
mutilators a present? But they did.
I do not need to describe the horrors of gas warfare and the infamous role of Fritz Haber (His wife, a pacifist, committed suicide
after the first gas attack). But I wonder if anyone still knows what "défaitisme" (defeatism in english, Defätismus in German) means and
how it was used. If you search for it seems to be only a word for hopelessness and giving up.
After the failed Verdun attack (it was called Blutmühle, blood mill) the Germans realized that artillery and mass attacks are simply idiotic and prone to fail. So they concentrated their powers on the East front and built a deeply connected system of fortifications,
the Siegfriedstellung or Hindenburg line. During 1916/1917 hundred of thousands French and English soldiers were killed in senseless
attempts to take the line with the methods which were shown to be ineffective. The generals did not care a bit, they were exactly as
evil, ruthless and uncaring as the purported Germans. The Germans named the soldiers Löwen, die von Eseln geleitet werden, lions led by donkeys.
Finally, in the first half of 1917 the soldiers were breaking. Whole divisions stopped fighting and obeying commands. The generals
denied any responsibility and accused the soldiers of cowardice and defeatism and started to kill their own soldiers in trials and cruel
punishments. This unjust treatment was simply eradicated from WWI history.
Breaking rules of war.
It would be interesting if the naval blockade of the United Kingdom is mentioned in the history books. GB was infamous for "paper blockades", saying e.g. that France is now "blocked" and this gives them the right to stop any merchant vessel (even in the middle of the Pacific) and search and confiscate any "contraband" which could be targeted for France (often without compensation). Many nations balked until finally 1856 the Paris Declaration was ratified, including England. This makes on point 4 explicitly clear that a blockade needs to be in the vicinity of the coast to be binding. This was further clarified 1907 in the Hague Convention and ironically 1909 an even better protection suggested by the Britons in London (the London Declaration) was never ratified.
Great Britain violated international law by declaring 1914 open water outside the territorial waters as "War Zone" and despite the explicit prohibition to block anything apart from belligerent material the Royal Navy also confiscated food and fertilizer, knewing that it would cause famine in Germany.
They also knew it because the blockade was incomplete during the first months because they feared to aggravate US merchant vessels. Only after the horror stories of Belgium (remember, many of them purposefully invented) was beginning to take effect, the US allowed the full blockade.
The RMS Lusitania which was blamed as attacking an innocent vessel
- transported war material (munition)
- the ship used contrary to naval law no flag or even the US flag (!)
- the Admiralty gave the order to evade U-Boats or trying to ram them, in contravention to the Cruiser Rules.
so in essence the ship was a valid target as blockade runner. And the Lusitania was no exception, strangely everyone remembers
the unrestricted submarine warfare, but nobody seemed to notice that Great Britain threw the rulebook of naval warfare
into the water.
Racism and imperialism.
Racism was alive and well during the beginning of the 20th century and Germany was neither an exception nor outstanding
in this regard. So accusing them of evil thoughts was ridiculous as any culture can testify which had the dubious
pleasure to be civilized by colonial powers. Pointing out the Hun talk of Emperor Wilhelm was first-class hypocrisy
because every colonial power was committing atrocities in China. And if someone think that Great Britain belongs
to the good guys may be reminded what happened one year later.
Endpoint
After the horrific war the original viewpoint had deeply changed. It was such an amount of devastation and loss of life that the
remaining people were simply stunned. The romantic ideal of war had died. As humans are, they were searching someone who was
responsible and Germany was easy to blame. While Germany started the fire, it was definitely not the evil Hun as it was painted
by the Allies and the Allies were not so good and blameless as they wanted to be seen.