Why polyethylene (PE), wool (polyamide) and cotton (cellulose) burnt with different smells, while they just product CO2 (and N2)?
Things are more complex than you suppose

There are two key reasons why these compounds burn with different smells.

The first is that your assumption about what the substances contain is wrong. Biological fibres contain plenty other than carbon and hydrogen. Often they will have lots of nitrogen and sulphur and various other elements and these often produce a variety of pungent chemicals that provide strong odours even in low concentrations. Plus artificial polymers will contain small amounts of other ingredients to modify their properties and these will often contain elements that give more complex combustion products some of which may be smelly.

The second is that burning these compounds in normal conditions is far from a perfect reaction yielding just the obvious oxidation products like carbon dioxide (which would be odourless). Even pure PE (and most of the PE you get will not be pure as it will contain various fillers and additives with other elements in it) will not burn cleanly to produce water and carbon dioxide). In normal conditions the burning will produce a variety of hydrocarbons and particles some of which will have odours. This is fairly obvious from the soot produced (which you would not get at all if the burning was completely efficient in producing carbon dioxide). The variety of those "imperfect" combustion products will be very different for different starting materials. So even compounds with roughly the same chemical composition (but different structure) may burn to give different combustion side products and, hence, will smell different.