Was it the rule back then "if you start a war for no reason, you should die"?
I know that it was a question for the Nuremberg trial, but was there an informal rule that "starting wars has personal consequences"?
Frame challenge: it is very unlikely he was thinking in those terms.
Firstly, he did not believe that he was starting a large war when he invaded Poland. He thought that France and the UK would either not go to war, or make peace after he conquered the part of Poland that he'd agreed with the USSR he'd take. In fact, both the UK and France declared war on 3rd September 1939, although they did not stage significant land attacks on Germany.
Since France and the UK had accepted all his previous acquisitions, and, in the case of the Munich Agreement of September 1938, pressured other countries to do the same, his assumption wasn't crazy. He'd failed to understand that his seizure of the rest of the Czech lands in March 1939 had been taken as proof that none of his promises meant anything, and the only way to stop him was war. Nazi views of democratic states as inherently weak, as repeated to him by Ribbentrop, his Foreign Minister since February 1938, meant that he was unlikely to understand the change, or to consider it significant if he had grasped it.
Secondly, he did not think losing was a plausible consequence of events. He took half of Poland, Denmark, Norway, The Netherlands, Belgium and France without any major difficulties. Had he stopped there, and avoided war with the USSR and USA, he might well have been able to consolidate his empire, and then embark on further conquests after a decade or so. However, he didn't do those things. Elements in that decision may have included:
The British refused to make peace with him, reckoning that peace would allow him to grow stronger. He attacked the USSR, because that was always his primary, ideological enemy, and felt Stalin would attack him if left alone. He was likely right about that, if Stalin had been given a couple of years to build up and re-organise his forces. He expected the USSR to collapse when attacked, and so did the British and the Americans: many people were surprised when that collapse did not happen in 1941, and some expected it in 1942.
Ribbentrop, adding to his achievements, tried to get the Japanese to attack the USSR. They were not interested, having tried that in 1932-39, and decided they didn't want any more. Once it was clear that they would not attack the USSR, Ribbentrop pushed them to attack the USA. They did so, of course, largely for their own reasons, and Hitler declared war on America too. He seriously under-estimated the preparations the US had already made for mobilisation and war production, and seems to have believed that the US would need all of its arms production for its own use against Japan. The idea that it could increase arms supply to Britain as well as arming its own forces, and put major forces into the field against both Germany and Japan simultaneously seems to have been beyond what Hitler's regime could imagine or accept.