apostrophes : girls' and boys' team
Solution 1:
I started trying to puzzle this one out and wonder if I fully understand what you are looking for, but I'll throw in my two cents anyway.
You can use the "girls' and boys'" example in at least two cases. One would be as in the team the girls are a part of and the team the boys are a part of as separate entities. Most likely because they are segregated by gender and the two groups (the boys and girls) both have their own team, distinct from the other. While in this case you would likely write "The girls' and boys' teams," I have seen it in singular form many times.
The original example is similarly noted here as being compound possession vs separate possession, that is, two owners of the same thing or two owners of two instances of a thing. The author then also give a counterexample where the object possessed (religious beliefs, in her example) are of the same type, but different instances. Both Hinduism and Christianity are "religious beliefs" but distinct from one another.
Echoed here, referencing The Chicago Manual of Style.
The second way would be if the writer is referring to two specific groups (known to the reader) of girls and boys that are forming one team. That is: "The girls' (of class A) and the boys' (of class B) team" I imagine though that this would be unlikely to be phrased as such and instead would be combined into a plural noun. i.e.: "The students' team..." There would also likely be more context before or after the sentence to explain which two groups are the subjects. This is another instance of joint possession, but while unorthodox, could be understood by the reader if they have proper context.
Those might be stretching because there are easier ways to phrase them, but they would probably be understood with foreknowledge.
Solution 2:
Girls is a description; in this instance, it's a team of girls. Girls' or girl's would indicate possession, as if the girls literally owned the team. So girls team and boys team is correct. (Your question is also a little unclear. If it's a co-ed team, you could write girls-and-boys team.)