Consider: is it the air blowing in your ears, the temperature of the air blowing through your ears (e.g. colder), or structures in and around your ears?
Sticking things in the canal may help if you're after blocking the sound and/or the movement of air into the canal; besides cotton, try out the disposable foam earplugs used for noisy workplaces. You need to roll them between your thumb/finger until they're completely compressed, then insert all the way into your ear (obviously, leave them in a position where you can still pull them out again!), letting the foam expand again and fill the canal. They should cut out wind, along with anywhere from about 5-25dB of sound from your environment. You can get plugs that mould to your ear, or are custom made to your ear, too.
Just remember that continually stuffing things into your ears may interfere with the natural movement of wax and debris out of the ears - along with moisture, this can increase risk of infections! If you actually have a chronic ear infection, you need to have that dealt with separately via medication. Symptoms that settle do not always mean an infection is gone, either - it can take multiple courses of antibiotics sometimes, or other drugs if it's fungal rather than bacterial. And some people are just very prone to middle ear infection based on their anatomy and function of the associated structures - e.g. the middle ear being able to drain. Infections can also be had in the mastoid bone ('behind' the ear) itself, causing pain; but this is much less likely than a good old-fashioned ear infection. Generally speaking, infection pain won't go away and only reappear when riding...
If you find plugging is not enough, consider pairing plugs or just using a buff or similar that covers your associated skull structures - the mastoid is pretty porous and makes up part of the anatomy of the ear area...some people are affected by the transmitted pressure or temp changes and get referred pain into the ear. This is also true of some of the other muscles/structures in the area, such as the jaw (temporomandibular joint area 'in front of' the ear). Keeping as much of the area as warm as possible may reduce some of the problem if it's related to the temp changes and general irritation of the related sensory nerves (due to the weather, vibration, etc, etc).
If it's also related to muscular tension (due to position of your head/neck, or helmet strap etc while on the bike) which is referring pain from elsewhere into ear structures, then positioning may also be a consideration.
Experiment. See what works best. But please stop putting Vaseline in your ears...