Like when you drag text here with a mouse and you have black rectangle covering area.
Is it possible?
If you want to add a background behind the text having the exact same width / height and position you can create a quad mesh and change its size using Bounds. Something like:
Bounds textBounds = MyTextMesh.renderer.bounds;
Then you can change the newly created mesh properties according to textBounds.