Still not too sure about your setup. Is the "line out" of the cassette deck connected to the "line in" of the sound card?
Is it the same make and model of cassette deck you use to play the cassette for listening as you use for recording? (For example, you're using the cassette deck in your car for playback but using a different unit in the home for recording to CD.) You can't expect equal results if you're using different sources for playback.
There is also the chance that your computer soundcard isn't up to snuff. You haven't mentioned make/model for any of the equipment you're using so it is still difficult to spot what may be going on.
Make sure you do not have any "auto level" gain controls turned on during recording. Make sure if the playback cassette deck has a tape bias switch (i.e, regular vs chrome tape) that it is set to the correct position. There may be other hardware switches or software settings that you need to twiddle with.
I use an old Nakamichi 700 MkII into my computer when I need to transfer an old cassette to CD and have no problems with loss of quality