While this may be a joke question, I'm going to take a serious crack at it.
First, start with human or a proto-human. We need intelligence (not listed), and that's the easiest way to get it.
- Can range in height from 7ft (213.3cm) to 8ft (243.8cm) tall
Normal size variation between species.
- are as or stronger than a gorilla
More normal variation. Might also use some of the alternate muscular attachment found in some apes.
- have hippo like ears
- reside in swamps
- can use their ears to play music
These three together. They started living in swamps for defensive purposes. (Much as humans took to water.) In order to (almost) completely submerge for long periods, their eustachian tubes became functional as an nasal extension, and the middle and outer ear connected. They can thus inhale and exhale through their ears. The ear shape then modified so it can extend upward to the water surface. The "music" is simply a result of this breathing, when pushed enough to get a "turbulent" flow.
This could be either a normal pigmentation variation (perhaps for camouflage) or an algae colony on or under the skin.
- have at least mildly toxic farts
I think humans already qualify for this. But for shrek, we probably should just add some more interesting intestinal flora, perhaps combined with something interesting in the diet.
- are like onions in some way
This was "have layers". If the green is algae, they could literally molt from time to time.
talking donkeys: as a non-hostile intelligence, it is something one can befriend -- or not.
animal donkeys: some wandered into the swamps and were domesticated by the shreks.
Probably related to the ear/nose modifications.
Intelligence, poise, and some training.