Will 28" - 29" rack suit my 27.5" bike? The particular rack is
Cube
Luggage Carrier Bosch

The particular bike is Cannondale Trail 6 with 27.5" wheel size.

Can the rack be attached to my bicycle in a right way?
Most racks are adjustable so that the rack can be fitted to a range of seat-stay lengths (more accurately, the distance between the eyelets the rack attaches to).

I think this rack designed for a 28-29" wheel may be made to fit as the forward support arms can tilt down but the rack may be positions a little high.

BTW, that rack is specifically for the Cube Bosch drive. The double-decker design is for holding a Bosch battery pack.