Undergravel filters really only work with gravel. A more suitable substrate will be dirt, or sand, but that will clog UG filters, and so might plant roots. Plant roots are an underground filter. Yes, a lot of the bacteria is in the substrate. If you already have a different filter, and you take the gravel out, this may cause a mini-cycle, but nothing to be overly concerned about.