No you didn't. Probably.
People's perception, when they sit in aeroplanes, is that it must be unhealthy from an air point of view. But once the engines are running, and particularly once the aeroplane is in the air, you are probably breathing the cleanest air you've breathed outside a clean room. Firstly, all the air in the cabin is replaced every 2-3 minutes. Secondly, the air that is used inflight comes from outside, well above all human pollution. Thirdly, yes, air is recirculated. But the recirculated air is put through a hospital-standard filter, which is effective at removing contaminants even down to the size of viruses. Fourthly, there is little lateral airflow in the cabin - the air normally flows in at the top of the cabin, and is removed at the bottom. So the exhalations from the person behind you aren't sitting in an invisible fug around your head. Incidentally, you may have noticed that the smell from the toilets doesn't spread through the aeroplane. Air from the toilet is often not recirculated, unlike the rest of the air.
"But I caught flu! And I was on the same aeroplane as someone who had it!" Well, the more likely culprit, in my opinion, is the airport you were in beforehand - lots of queueing, sitting in crowded gate areas, probably a much greater diversity of people than were on the aeroplane. That and the fact that travelling is stressful, and stress makes it more likely you will get ill.