Separate Pool and Spa

If I will have a seperate pool and spa with two different pumps.  Can the two share the same filter and heater with ability to heat both at the same time at different temperatures.   I’m trying to avoid pulling water from pool and pushing into spa when trying to heat both pool and spa.