Solution 1, C-style
Modify the function to accept the names (you can think of them as pointers) of the variables where the result is to be written.
func () { eval "$1=Dan $2=38"; }
func name age
echo "name=$name age=$age"
Solution 2, manual split
This is similar to your solution, but has the advantage that it doesn't use files or call to external programs like awk.
func(){ echo Dan 38 }
both=$(func)
name=${both%% *}
age=${both#* }
echo "name=$name age=$age"