For the first time, hydrogels based on silica- and titanium-poly(ethylene glycol) have been used for immobilization of Gram-negative bacteria (Escherichia coli MG1655) and Gram-positive bacteria (Rhodococcus qingshengii X5) in a one-step sol–gel synthesis. Vibrational spectroscopy and thermogravimetric analysis have confirmed the formation of amorphous hybrid structures with a predominance of organic components and metal-oxide grids. Encapsulation efficiencies were 72–77% for Si-PEG-based hydrogel and 50–54% for Ti-PEG. Antimicrobial activity tests revealed that Si-PEG was non-toxic, while Ti-PEG reduced cell viability by 50%. For the first time, an analysis of the morphological properties of immobilized bacterial cells revealed the formation of a thin Si-PEG-based hydrogel shell around each cell and a thick polymer layer on the bacterial surface when encapsulated within Ti-PEG-based hydrogels. The catalytic activity of the biocatalysts, as measured by the ATP content, remained at 84–93% for Si-PEG-based hydrogel, and decreased to 5% for Ti-PEG-based hydrogel. Biocatalysts based on encapsulated bacteria in a Si-PEG-based hydrogel demonstrate high sensitivity and stability. Si-PEG-based hydrogel exhibits high biocompatibility, making it suitable for the effective encapsulation of various bacterial types with a “cell-in-shell” structure.