Using wrong speed/size cassette on trainer
As you suspect, you cannot use the 8 speed cassette with either bike. The indexing will be completely wrong.

8, 9 and 10 speed cassettes use the same freehub body so you can put a 10 speed cassette on the wheel. The sprocket spacing on the 11 speed cassette is different from the 10 speed, so that isn't going to work, at least not very well. Maybe you could get a few gears to work.

If your derailleur capacity and chain length don't allow the use of a 11-28 cassette, you will be OK as long as you stay off the sprockets that are too large. If you can't use a 11-28 cassette, why fit one? I guess you happen to have a spare lying around?