You can't tell for certain either which key this is in, or which chords would appear above these bass notes, but for different reasons...
This short excerpt of music has only four pitches: E, D, F# and G - these notes are found in the scales of several keys:
- G Major and its relative minor E Minor (natural minor) have these notes: E, F#, G, A, B, C, D
- D major and its relative minor B Minor have these notes: D, E, F#, G, A, B, C#
Notice that all four keys contain all four notes. However, this excerpt of music in isolation is most likely to sound like it is in E Minor, simply because this is the starting note. Without seeing the context of this short excerpt it is impossible to say if this indeed in E Minor, though. (Also, it is worth noting that we are talking about E Natural Minor here; popular music commonly uses natural minor scales, which have exactly the same pitches as their relative minor. However, "classical" music would most likely use the Harmonic and/or Melodic Minor scales, which adjust these natural minor notes, most significantly by raising the seventh by a semitone, to a D# in this case. And, notice we are only taking about diatonic scales here, each of these can be interpreted as several modes, and then there are a great number of more exotic scales which would contain these four pitches, which aren't diatonic.)
So, now to the chords that this bass line would suggest. Again, it is impossible to say with certainty. If no other parts play with this bass line, then yes each bass note would most likely be interpreted as the root note of chords within whichever key the music seems to be in. As I say above, this would appear to be E Minor, which means the chords implied by the bass line could be: Em, D, F#dim, G. Ah, but wait a minute! F#dim doesn't seem like the most obvious chord to hear implicitly above these F#s. Perhaps one could "hear" the first inversion of the preceding D chord (a D Major chord with F#, the third, in the bass). Or maybe this music isn't in E Natural Minor (Aeolian) at all, but is in E Dorian (which just so happens has D Major notes). The E Dorian chord with F# as its root is F#m.
The point to realise here, is that there are more and less likely chords and keys implied by this short excerpt of bass line, but you can only say for certain which key (or even mode) you are "in" by knowing which other pitches are being used. And, you can only know for certain which chords (or harmony, if you want to call it that), would appear above this bass line, by deciding (if you are writing this music) or working out (if this music already exists) which notes are sounding in other parts at the same time as each of these bass notes.
Finally, it is worth pointing out that the bass notes do not have to be either root notes or even triadic notes. An Em chord could sound above all of the notes in this bass line: with the F# and D being non-chord-tones (you imply this interpretation by mentioning Emin9).
EDIT: here are a few simple examples of chords which can harmonise this short bass line (i.e. which chords would seem to naturally fit with these bass notes):

As I mentioned above, there is no reason why the harmony above these bass notes cannot have pitches which are not suggested by the bass line itself; in other words, notes which are chromatic within whichever key seems to be suggested. However, having tried to find some examples of suitable chromatic chords above this bass line, all attempts seemed pretty contrived; this is unsurprising, as these bass notes strongly outline a portion of a diatonic scale or mode. Trying to harmonise them in a way which doesn't fit with the implied diatonic scales associated with these notes is therefore bound to sound contrived and "difficult".