In regards to this question, "What is the average level of every Pokémon used by gym leaders in every region?", I'm curious as to what the average level of the Pokémon that are battled during Trials and Kahuna battles really are.

What would be the average level of every Pokémon, not including SOS encounters within Trials, used in said Trials and Kahuna battles?

The average level for all 21 Pokemon would be 30, or more precisely, 29.6666666667.
All of the levels are:
14, 14, 15, 26, 26, 27, 38, 38, 39, 47, 47, 47, and 48 for all of the kahunas, and
12, 12, 20, 22, 24, 29, 33, and 45 for all of the totem Pokemon.

Average totem Pokemon level: 26 (counting Gumshoos and Raticate as one Pokemon)
Average Pokemon level in Kahuna battles: 33
There were a lot of sources and I was too lazy to list them all, but you can ask for a specific piece of information and I'll give you the link.