Blunders by senior leadership e.g. Archduke Charles? Incomplete reform of the Austrian army? Was attacking the French just a bad idea in the first place from a material perspective? Was it just an extraordinary run of bad luck?
I will be heavily relying on the work of John H. Gill, namely on his three volumes of 'Thunder on Danube' - it is arguably the best work there is on this topic in English.
The decision to go to war with France was not without controversy - there was the war party with the most prominent members being Johann Philipp von Stadion, foreign minister and chief diplomat of Francis I, and the Empress Maria Ludovika (no wonder considering that Napoleon ousted her father from Italy and incorporated her grandfather's ancestral Duchy of Modena into the Cisalpine republic). The de facto leader of the faction that pushed against war in 1809 was none other than Archduke Charles himself.
The war party was convinced that it was just a matter of time before the Habsburg Monarchy gets Napoleon's 'Spanish treatment', so war was in their eyes inevitable anyways. Besides it is worth noting that the Habsburg monarchy never really accepted the territorial losses it had to endure as part of the Pressburg treaty as well as the earlier treaties of Lunéville and Campo Formio.
Stadion believed that now was the time to strike as Napoleon was engaged on the Pyrrenean Peninsula and he got reports from Metternich, who served as a Habsburg ambassador in Paris at that time, about unrest in France and general French disunity.
However, Stadion also suffered from pretty serious cases of confirmation bias and wishful thinking, going as far as being delusional. After his talks with the Russians he was repeatedly being told something along the lines that in the case of war, Russians would honour their alliance with France, however that they would not enjoy doing so. Stadion rather unfortunately interpreted that as Russians saying that they would either be neutral or even join in against France. He also believed to the last minute that the Prussians would contribute 40 000 troops at the start of the war and sending another 40 000 as the war progressed, and assumed that Britain would provide substantial financial as well as military help. He also thought that it would take Napoleon at least until summer before he manage to muster enough forces to be a threat, so the Habsburg forces would have a window of opportunity when they would enjoy numerical superiority to achieve their goals. Suffice to say, all of these assumptions proved to be false.
However, the most bizzare of all was his assumption that there would be some sort of a massive nationalist/anti-french popular uprising in Germany - the rebels would then submit themselves under Habsburg command and provide support to the Habsburg armies. He based this on reports from various nationalist intellectuals, who claimed that the entire Germany war ready to 'rise up' and that they just needed a proper spark. Needless to say, this line of thinking was completely out of touch with the facts on the ground; save for the famous Tyrolean uprising led by Andreas Hofer, no such rebellion took place. Unfortunately for the Monarchy, Stadion was so convinced that it would happen, going as far as placing upon it more importance than on diplomatic ties with other powers.
Stadion also formulated rather sweeping and overly ambitious war goals, John Gill aptly writes that Stadion wanted to erase past 20 years of history - to name a few he wanted to regain the territory lost during the past wars with France, he also wanted to restore Germany and Italy and their monarchs and princes the way they were prior to Napoleon (regardless whether said monarchs and princes would even want that by the way) and there was a subtle implication that HRE would be restored, though no-one really said that aloud. The plans and goals also did not include an invasion of France itself.
However Stadion did not really seem to think them through all that much - they were very difficult to translate into a realistic military strategy, Stadion really seemed to believe that the Habsburg forces supported by the rebel militias would just roll over Germany and Italy, conquering state after state in a rapid succession before Napoleon can muster a response, at which point it would be already too late for France as it will be facing a massive army consisting of the Prussians, Habsburg forces as well as those of other German Princes in Germany under the Habsburg command which would be sufficient to repel any potential counter-offensive.
Gill also thinks that Stadion fundamentally misunderstood the nature of the conflict he was seeking to start - with no plans on invading France, Stadion assumed that this would be just another 18th century-style war of provinces, where Napoleon would, after a few defeats in Germany, just admit defeat and relinquish his power in Germany and Italy as part of a lasting political settlement without much of a fuss. However, it was very unlikely that Napoleon would just accept this, Gill writes that most likely the only way to achieve these goals would really be a complete overthrow of the French power, if not of the Emperor himself.
As to the reasons for the Habsburg defeat: they are numerous with most of them being a fault of the senior leadership, ranging from operational and strategical errors (some of them stemming from the problematic formulation of the war goals), various tactical blunders to the simple fact of having Napoleon and the French army as their enemy.
However probably the biggest problem was that the Habsburg army just wasn't ready for war. The reforms, albeit helpful, were often really just these weird half-measures that never really abandoned the outdated military tradition of 18th century and linear warfare; an example would be the stance towards skirmishing - while Charles did place an emphasis on it, he kind of tied it down with a rather complicated set of orders and drill instead of relying on initiative and tactical adaptability (a general problem of basically every element of the army by the way). The new elite light infantry, the Jäger, on the other hand had no manuals whatsoever and commanders did not really understand how to use them properly, so more often than not they just put them in the order of battle like they would an ordinary infantry battalion instead of using them to cover the front.
Logistics were also inadequate, the operational plans relied on speed to achieve their goals, however as a result of the logistical situation, the army was incredibly sluggish lagging behind the deadlines; the army was also still undermanned, lacking sometimes even entire battalions worth of men.
Archduke Charles himself is also not without blame, he was probably being way too cautious, he hoarded a large amount of reserves just to cover his retreat rather than using it to swing the battle in his favour and was satisfied with just tactical defensive victories, Aspern being a good example of the latter.
Speaking of Aspern, I would also caution against overestimating that victory - while it was a triumph for the Habsburg forces, it was in the shadow of the battle of Ratisbon/Regensburg, where French cavalry was particulary effective, that basically threw all the Habsburg plans out of the window and it was considered a disaster by the Monarchy. The loss at Regensburg also had a lasting consequence on the mind of Habsburg officers - during the battle of Wagram a part of the battle was taking place on the field of Marchfeld where Habsburg commanders anxiously kept their infantry in the so-called masses, a tight and deep anti-cavalry formation, basically a variation on the infantry square, out of fear of French cavalry while being blown to bits by the numerically superior french artillery.
The bottom line is, that the Habsburg Monarchy entered the war with false assumptions, the war goals were too ambitious and hard to put into practice, its army, while probably one of the best it ever fielded, was still not prepared for the conflict and the Habsburg leadership really wasn't the best.
Sources:
Gill, John H. - Thunder on Danube, Napoleon's Defeat of the Habsburgs vol. I-III, 2010 - 2014
Kovařík, J. - Napoleon na Dunaji, 2009