This is incredibly oversimplified, but the short answer is that both T and B cells can have degenerate recognition, though the molecular mechanisms are somewhat different.
T cells recognize linear sequences of amino acids that have been excised from their parent proteins, from 8 to 16 or so amino acids long, and that are associated with MHC proteins. The association with MHC proteins depends on the specific sequence of amino acids, and you can think of this association as depending on a number of amino acids (let's say 4 or 5) that point "down" into the MHC. That leaves maybe 4-10 amino acids pointing "up" that can interact with the T cell receptor. If you search for a random set of 4 amino acids with a given spacing, it's quite likely that it will turn up several times in a large protein database; even more often if you allow some degeneracy (similar amino acids can substitute sometimes). Therefore, yes, T cells tend to have a moderate amount of degeneracy in their epitope recognition. However, while search a whole database may find duplicates, the degeneracy is not terrible, and the MHC binding requirement also reduces it quite a bit. Also, of course, during T cell development, TcRs that have broad and degenerate recognition of many structures are selected against. So T cells are definitely cross-reactive, and sometimes extensively so, but in single individuals it's probably not a common thing. (Ray Welsh and Liisa Selin have looked at cross-recognition between viruses and find quite a bit of cross-reactivity, though, so this may be understated.)
Antibodies, unlike T cells, recognize conformational epitopes rather than linear sequences. However, just as with linear epitopes, it's not impossible for two unrelated proteins to end up with similar conformations, even with rather different amino acids. As well, antibodies can be more or less "forgiving" in their recognition; some are extremely specific, but others can interact with a wider range of shapes. You can imagine a "flat" antibody binding surface that is rather generic, that could interact with many different shapes. Again, B cells with broad cross-recognition are selected against during development, though not as rigorously as are T cells.