Since science pack drain does scale in vanilla, this seems a bit out of scope for this mod.
I could add a setting to change the scaling strength, but I think putting that in a separate mod would be better.
If you want quality to be competitive with productivity, you'd need an exponential scaling instead of a linear one: 1x drain @normal, 0.2x drain @uncommon, 0.04x drain @rare, 1/125x @epic would mean all-productivity and all-quality setups result in the same total research output per resource input (ignoring the rare multi-step quality improvements).
The factor 5 comes from the fact that prod3 modules are 4x as "effective" as qual3 modules (10% vs 2.5% at normal quality).
Having 4 prod3 modules means you get 1.4x as much output per processing step, and 4 qual3 modules give 10% chance of a quality improvement. This means 0.9 + 0.1*(science_factor) == 1.4 -> science_factor == 5
The quality limit at legendary means that there is a limit to the total benefit of quality with long production chains, but the higher quality improvement at that last step also gives slightly better payoff if the production chain has just the right length to frequently reach legendary at the last step, so there is some flexibility there, but with any plausible linear scaling quality will always be much worse than productivity (unless cargo density is the primary concern).