Italy did inform Germany of its unreadiness for war long before Germany's attack against Poland.
The most important reason that this failed to deter Hitler was that the Germans didn't actually tell the Italians they were going to war - the only country that knew what was about to happen was the Soviet Union. Germany made the final decision for military conflict against Poland only in August of 1939 - although the German determination for war was at least as old as the second Vierjahresplan of 1936.
After signing their official Non-Aggression Pact and their additional secret protocol with the Soviets, the Germans did not want to jeopardize the secrecy of their advance by telling the Italians who wouldn't have been in conflict anyway - remember, the German planners did not expect the Allies to act on Poland's behalf and gambled for the invasion of Poland to stay brief and regional.
In fact, William L. Shirer in The Rise and Fall of the Third Reich establishes the fact that Italy did its best to prevent the war, fearing the world war the Germans deemed so unlikely.
I'll take the liberty to quote Shirer's passage in question here, and I'll try to add some [annotations] for better understanding of the various characters.
Attolico [Italian ambassador to Germany 1935-1940] called on Ribbentrop [German Foreign Minister 1938-1945] and communicated the "urgent desire of the Duce [Benito Mussolini]" that the Führer [Adolf Hitler] should receive Lipski [Polish ambassador to Germany 1933-1939] "to establish in this way at least the minimum contact necessary for the avoidance of a final breach." The German Foreign Minister promised to "transmit" the Duce’s wishes to the Führer. This was not the first call the Italian ambassador had made in the Wilhelmstraße [street in Berlin, here to be read as: the German government] on this last day of August in order to try to save the peace. At 9 that morning Attolico had advised Rome that the situation was "desperate" and that unless "something new comes up there will be war in a few hours." In Rome Mussolini and Ciano [Italian Foreign Minister 1936-1943 (also Mussolini's son-in-law)] put their heads together to find something new. The first result was that Ciano telephoned Halifax [British Foreign Minister 1938-1940] to say that Mussolini could not intervene unless he were able to produce for Hitler a "fat prize: Danzig." The British Foreign Secretary did not rise to the bait. He told Ciano the first thing to be done was to establish direct contact between the Germans and the Poles through Lipski. Thus at 11:30 a.m. Attolico saw Weizsäcker [State Secretary of the Foreign Ministry 1938-1945 (not be confused with his son, a later West German politician)] at the German Foreign Office and apprised him that Mussolini was in contact with London and had suggested the return of Danzig as a first step toward a German-Polish settlement, and that the Duce needed a certain "margin of time" to perfect his plan for peace. In the meantime, couldn’t the German government receive Lipski? Lipski was received by Ribbentrop at 6:15 PM, more than five hours after he had requested the interview. It did not last long. The ambassador, despite his fatigue and his worn nerves, behaved with dignity. He read to the Nazi Foreign Minister a written communication. [...]
So, what happened once the war started? Well, Italy needed a way out of a conflict that it was militarily and economically unready for however technically obligated to join as per Article III of the Pact of Steel of 22 May 1939; and the best way to not fulfill a military alliance is to just nicely ask your alliance partner. That is exactly what the Italians did. On 1 September 1939, at around 9 to 10 AM, Hitler responded to Attolico's delivery of an inquiry by Mussolini favorably and formally confirmed that he would not call Italy to arms under the current circumstances.
Not that it would have changed anything if he had: Mussolini already had sent a secret note to the British the night before, before the war even started, that it would neither fight against France nor Britain, effectively declaring its neutrality to their possible enemy while not telling their ally about it. [Insert funny meme about Italian sideswitching here]
Another Italian inquiry to end the war with a peace conference between the four great powers and Poland ended in nothing on 2 September 1939. On the 3rd, the British and French ultimatums to Germany expired and both countries stuck to their guns and declared war against the Germans.
As to the claim of the "mid 1942", that comes from Carlo Favagrossa, the Undersecretary for Military Production. This was an information the Germans had and that had been given to them as part of the Pact of Steel, where as a result both countries made a loose promise to not seek military expansion without the other before 1943. Both countries however arguably breached this promise by each risking war on their own terms - Italy with its ultimately bloodless invasion of Albania and Germany with its ultimately ultimately bloodless invasion of the Resttschechei, the remainder of Czechoslovakia.
The estimation of Italian readiness seems to have been accurate if not understated, but Mussolini's megalomania in particular became one of the driving factors in not letting the opportunity of a good war slide, much to the dismay of the still unready Italian military production. Just as British commander Archibald Wavell predicted at the start of the war, Italy made its decision to intervene. In June 1940, Mussolini famously declared that he only needed a few thousand dead to be able to sit at the table of war winners as one who had fought. A decision that would eventually cause Italy territorial losses, economic despair, massive casualties and that would cost Mussolini himself his life, as he was eventually murdered by partisans.
On November 6^th 1937 Italy had joined the Anti-Comintern pact with Germany and Japan (and Spain).
From May 3^rd to May 10^th 1938 Hitler visited Italy.
On September 30^th 1938 the Munich Agreement was signed.
On March 15^th 1939 Germany annexed Bohemia.
On May 22^nd 1939 Italy signed a "total" alliance with Germany: the Pact of Steel.
On September 1^st 1939 the German ultimatum to Poland opened a new general European conflict.
On June 10^th 1940 Italy joined the War against France and Great Britain.
Keeping this time line in mind; the most challenging aspect of the Italian foreign policy was how to align with an ally that Italy perceived as both: way stronger in the long run; more and more restless under the restraints of the European situation.
To summarize very briefly the Italian point of view: Germany wanted war sooner or later; eventually they were going to get what they wanted; later was better than sooner. The geographical situation, the nature of the diplomatic relations, the German ambitions that moved along lines that did not touch those of possible Italian expansion; those elements had given Italy a natural “moderation role” on their German ally. The longer Italy was able to delay the “War”, the more influential Italy would become. The sooner the conflict started, the less Italy was going to weight. Italy could provide Germany with useful diplomatic assistance; but at least until 1942-43 it would be able to provide very minimal military assistance. As long as Germany required a mediator, Mussolini could delude himself of holding Hitler's reins; the minute the War started, Mussolini needed to rethink his entire position.
The necessity of waiting a few years was not only a result of strategic, technical and material limitations – it was also a convenience to preserve what influence Italy had (or believed to have) over the German leadership and diplomacy. Influence that would have disappeared in the instance of war.
The information you have is therefore correct; and now more details.
The weeks between the annexation of Bohemia and the declaration of the Pact of Steel are probably the most relevant; because it begun to be clear that Germany was going to war and yet Italy could still think of itself as an independent enough subject to at least consider a general political frame for the imminent Pact that did not lead immediately to war.
Mussolini had met with Göring on April 16^th and had come out of the meeting aware that “in a few years, there was going to be war between the Axis on one side and French and GB on the other”. According to Italian Foreign Minister Galeazzo Ciano, Mussolini agreed with Göring that it was necessary to “talk of peace and prepare for war”.
That Mussolini had taken the German Ministry's words seriously is shown by a memorandum that he drafted for Ciano and was given to the latter on May 4^th in preparation for his meeting with German Foreign Minister Ribbentrop of the 6^th and 7^th . There Mussolini explained that Italy (and Germany) needed, in order to make ready for war of “a period of peace […] no shorter than three years” that was “necessary” in order to [the list is Mussolini's]:
a) to make military preparations in Libya, Albania and pacify Ethiopia, from which an army of half a million men needs to be withdrawn;
b) to finish the building and ongoing renovation of the six ships of the line
c) to renovate all our artillery pieces of middle to large caliber
d) to develop the autarchy plans that will make any attempt of blockade pointless
e) to complete the World Exposition of 1942, which can, besides showcasing the first twenty years of the Regime, provide us with value reserves
f) to repatriate the Italians from France, an issue of very serious military and moral nature
g) to accomplish the transfer of many war industries from the Po valley to Southern Italy
h) to develop the relations not only between the government but also the peoples of the Axis nations; to which a relaxation of the relations between the Church and the Nazism would be beneficial
“For all these reasons” wrote Mussolini “fascist Italy had no desire to hasten an European war, despite being certain of its inevitability”.
Three days later, Mussolini, without previously giving any sign of his intentions to proceed on such a tight schedule – if we believe Ciano's recollections – called Ciano on the phone while he was finishing his talks with Ribbentrop and ordered him to accept the German requests of a military alliance that Ciano had “left hanging for over a year [Since Hitler's visit of 1938] and meant to keep there for a while longer”.
The idea that Mussolini had rushed the agreement because he wanted to make up for the miserable impression that the Italian reaction to Ribbentrop's visit had made to the Germans [police reports described the Italian attitude as “disheartened” to “indifferent”] is supported by former Italian Foreign Minister Dino Grandi. But the general reasoning behind Mussolini's impulse is explained by Grandi with more depth [Grandi's memoirs were written after the war, in Portugal, where he had moved in 1943].
According to Grandi, “Mussolini had rejected Hitler's offer of an alliance in May 1938. Since then the Germans had worked to move him towards their positions”. After the occupation of Prague, Mussolini had not hidden his concerns over the German move “that compromised entirely the Munich Agreement [that had established him] as arbiter and moral guarantor of Hitler's promises. Hitler had told him nothing of his intentions to destroy Czechoslovakia. Mussolini had learned it from the news. […] Germany was slipping through his fingers. He thus believed he was tying Germany to himself and didn't realize he was instead tying himself to Germany. […] Mussolini intended the pact as a guarantee, for the time being, of European peace […] he thought, by signing the pact, that he would earn the formal right to a preventive consultation; and such influence he meant to use in order to delay war, not to unleash it”.
It's not necessary to agree entirely with Grandi's analysis to understand how such a move – dramatically staged in Mussolini's style as an abrupt Caesar-like resolve – would make sense in a context where the Italian diplomatic power had come essentially from Mussolini's ability to hold onto Hitler and prevent his excesses. Or at least how this point of view was likely that of Mussolini himself.
Who did Hitler declare war on? Or did you mean Hitler went ahead and invaded anyway?