PHP traets strings in two differnt ways depending on the quotes that you use for them. It's a little strange, but when you understand the difference you'll find it easy.

When you use double-quotes, any variables inside it are parsed to the value of the variable. eg:

$val = "Hello World"
echo "$val"

This outputs Hello World.

When you use single-quotes, any variable sinside are not parsed, it's taken as a literal string exactly as you've typed it in:

$val = "Hello World";
echo '$val';

This outputs $val.

In your case, you'd need to set up your call something like this:

echo do_shortcode('[rotating-posts category_name="' . $title . '"]');

As a foot note, I prefer doing it like this os that I can easily and clearly see where the variables are in the text. That lets you see where things are and there's no problems with missing variables inside the string when you're looking at it quickly.