The abdominal muscles do not cross the hip joint, so in any movement involving hip flexion (including sit-ups, leg raises, etc), the abdominals serve as a secondary, stabilizing muscle, not a primary mover.
Re doing an exercise that causes you back pain: Don't. If your instructor is insistent you do them, find a different instructor.
A similar (but less back-unfriendly, and more efficient) variation you might be able to do without pain: Lie on the floor as per usual, but instead of anchoring your feet, flex at the hip so that your thighs are pulled up, and your calves are resting against the backs of your thighs. (Not rigidly; your legs should feel relaxed.) In this position, do crunches wherein you try to touch the lower edge of your ribcage to your hip bones. (You can't do it; it's just a movement cue to help with form.) The ROM is very short, but it's all rectus abdominus. Because you're not flexing at the hip, your lower back should be spared the unnecessary strain that's causing your pain.