How to play the bass note louder in the given example while keep the treble note in the same chord still soft as the other successive notes? I play it on guitar. I always make the notes in one chord the same volume.
I assume you're playing fingerstyle, since you don't mention having to mute a string in the middle. I think the best technique to help with this is the apoyando (rest stroke).
In the apoyando stroke, you touch the string more. Instead of just scraping with the nails, you first touch the string with the flesh of your fingertip, very close to the nail. Then, without releasing, pluck the string in one swift motion and follow through until the finger comes to rest against the next string.
So for the first beat in your example, your thumb should already be pressed against the low A string, ready to pluck; and the index finger placed against the G string also ready to pluck. Then right on the beat, squeeze the fingers towards each other so that both the thumb and finger grab the D string.
I'd recommend practicing this separately for each finger or thumb, then each finger combined with the thumb, then also try plucking 4-note chords. The fingers may not actually come to rest against the next string for playing chords, because the ringing is important. If the bass note is separated from the other three notes, you can still get a nice apoyando with the thumb. For the choir part of the chord, you can still place your fingertips on the strings first and pluck with a nice fleshy tone.
The apoyando stroke tends to give more control of the dynamics of each individual note than the enganchando (free stroke). (Wikipedia appears to call the "free stroke" tirando, but I think Celedonio Romero called it enganchando.)